This workbook centralises analyses of the PHQ-9, GAD-7 and MASQ total scores longitudinal analyses in the RAMP and COPING samples - identifying the best fit average group trajectories (Latent class growth analyses; LCGA). This corresponds with analytic step 1 in the pre-registration for project “Moderators of symptom trajectories of depression and anxiety during the COVID-19 pandemic”.

The analytic steps that will be followed for PHQ, GAD and MASQ are:

Step 1. Identifying overall group trajectories of anxiety and depression (Latent Growth Curve Modelling; using total scores across all time points for whole sample) Step 2. Assess fit and stability of models Step 3. Identify and conclude the best fitting model Step 4. visualise all relevant trajectories alongside observed data-based trajectories.

Setup

# clear global environment
remove(list = ls())

note: some of the install and update processes require command line verification in the console. If you are running this script for the first time and it does not proceed, open and check the console

colour paletttes and plot label list

RAMP colours (first) from website and second is a generated left tetradic (rectangular) colour complement of the RAMP logo green for contrast and complement.

Step 1. Latent Growth Curves

Identify the best fitting latent growth curve form, i.e. that which fits all of the data best, on average, for each outcome.

Notes on timepoints included

  1. The MPlus input time interval specifications go from increasing by 1 for the first 8 follow-ups (we measured with two week intervals) to increasing by 2 for the remaining timepoints when we moved to monthly. The choice of interval is arbitrary, but the relative difference should be retained.

  2. We dropped timepoints 1 & 2 (see ‘Overview of model alterations and adaptations’ below)

Overview of of models

  • Linear
  • Quadratic
  • Piecewise: four pieces, corresponding with lockdowns and easing of restrictions between April 2020 and April 2021 (see below)
  • Each of these models will be repeated, including pairwise correlations between consecutive timepoints

Piecewise trajectory key dates

Four pieces
These dates are based on guidelines in England - TO CHECK no major discrepancies across Scotland; NI; Wales

  1. Lockdown 1 (23 Mar 2020) until first easing of restrictions (23 Jun 2020)

Slope includes data points: Baseline (7 Apr 2020) - Follow-up 5 (16 Jun 2020)

  1. Summer easing of restrictions (23 Jun 2020) until beginning of Lockdown 2.0 (31 Oct 2020)

Slope includes data points: Follow-up 6 (30 Jun 2020) - Follow-up 11 (20 Oct 2020)

  1. Winter lockdowns (31 Oct 2020) until Spring 2021 easing of restrictions (8 Mar 2021)

Slope includes data points: Follow-up 12 (17 Nov 2020) - Follow-up 15 (9 Feb 2021)

  1. Spring 2021 easing of restrictions (8 Mar 2021) until end of study period (6 Apr 2021)

Slope includes data points: Follow-up 16 (9 Mar 2021) - Follow-up 17 (6 Apr 2021)

Notes on lockdowns

England:

  • Lockdown 2.0: 31 Oct 2020-1 Dec 2020

  • Easing of restrictions + tier system: 2 Dec 2020 (Tier 3) - 20 Dec 2020 (Tier 4 introduced)

  • Lockdown 3: 6 Jan 2021 - 8 Mar 2021

Scotland:

Wales:

Northern Ireland:

Covariance coverage issue

After manual checks of each stage, an issue with covariance coverage was detected. The resolution is detailed here.

The covariance coverage (% of participants common to any two time points) between some time points is lower than MPlus default (0.1; 10%). This prevents algorithm for missing data being applied (MLR; maximum likelihood with robust standard errors) and standard errors cannot be computed, even when setting the coverage expectations to zero.

Looking at our data structure and MPlus output, this is due to missing data for follow-up 2 & 3 (RAMP only, no COPING data) resulting in perfect zero covariance coverage with follow-up 17 (currently COPING only; RAMP data extraction issue).

CHANGE TO MODEL: Now running without timepoints 2 & 3

PHQ-9: Current Depression Symptoms Latent Growth Curve Model

Data summary

phq_check <-  readRDS("../../../data_clean/phq/phq.clean_merged_total_scores.rds")

# get a list of the total score columns
total_cols <- grep("total_Wave", names(phq_check))

#count how many columns we have
n_cols <- length(total_cols)

# create a list of how many NAs are missing across these 18 columns per row
list_n_missing <- apply(phq_check[total_cols],1,function(x) sum(is.na(x)))

# count how many people are missing data for all columns (NA = total_cols)
list_all_missing <-  sum(list_n_missing ==n_cols)

print(dim(phq_check)[1])

[1] 52416

print(list_all_missing)

[1] 10410

Important note: all numbers correspond exactly with MPlus output numbers (n per wave and n missing all observations etc).

run all models

Don’t rerun models if there is already output for it (to save computational time), do show the output in the console IN FINAL MAKE SURE SCRIPT STATES eval=FALSE so that MPlus models aren’t rerun

runModels("./MPlus_input_lcga/PHQ", 
          recursive = FALSE,
          showOutput=TRUE,
          replaceOutfile="never")

Examine model output

This reads in all output, including the gh5 plot files

dep.traj.all <- readModels("./MPlus_input_lcga/PHQ", 
                           recursive=FALSE)

Check warnings and error messages

  • Warnings: check through warnings from console
  • Errors: error messages when running models and how each was resolved
Warnings

at the moment this doesnt say which model the warning is from, so any warning requires checking to identify its source. Though order in list will give some indication

justWarnings <- do.call("paste",
  sapply(dep.traj.all ,"[", "warnings"))

justWarnings

[1] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("All continuous latent variable covariances involving LIN4 have been fixed to 0", "because the variance of LIN4 is fixed at 0.") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”
[2] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10410", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”

Warnings are all about missing data (missing on all obs, this number lines up with our expectations from the dataset in the section above)

Otherwise, no warnings. Check one complete.

Note that there are more people missing on all observations having dropped time points 2,3, and 17. Was 7866, but this version is 8217 .

errors

All resolved. See below sections for descriptions.

Check any errors with running any of the models. Output here will not say which model it belongs to, so will need to manually examine if errors occur,

justErrors <- do.call("paste",
  sapply(dep.traj.all ,"[", "errors"))

justErrors

character(0)

Issue 1: Models fail to finish running and converge (resolved)

Some of the models have failed to converge:

  • Piecewise with pairwise residual correlations
  • Quadratic
  • Quadratic with pariwise residual correlations

Steps:
* Increased number of iterations to 5000 (Mplus default is 1000).
* This worked somewhat for the piecewise and quadratic (without pairwise correlations) which now have more informative errors
* This did not work at all for quadratic (with pairwise residual correlation). Increased iterations to 10000 for this one.
* This worked.

Issue 2: Models are no specified due to time point 3 parameter (resolved)

Now all three run, but could not compute standard errors as the models were misidentified or did not converge.

Issues are all with specified parameters now:

quadratic: Problem involving parameter 2 (T_3) * examining the data, I have made an error with the dataset. There are 4325 in this time point. This corresponds to the second follow up that is meant to be dropped from this datafile. Interestingly, T4 onwards is correct. T3 should have 2662 observations. Appears I have wrongly dropped this wave instead of follow up 2. Note: this is exactly what I had done. Corrected and rerun all models

Issue 3: Models are no specified due to low coverage covariacne between t 3 and timepoint 6,8,16 (resolved. CHECK WITh KATIE)

Checked this manually, and there are only 4 people who did both timepoint 3 and timepoint 6, 4 who did timepoint 3 and tomepoint 8, and only 3 who did time point 3 and timepoint 16

  • issues to consider here include the fact that having low observed data can caus instability and may lead to ore groups than there really are at a later stage
  • On the other hand, the fixed dataset now has good coverage for all other pairings ( min 0.007, representing > 100 people in all cases). Thus dropping this time point might lose more information than it gains.

Options are either dropping time point 3, or dropping coverage requirement.

  • tried dropping coverage requirement to see if there remained problems with parameter 3 that would indicate instability.
Issue 4: Quadratic models misspecifed (resolved)

The two quadratic models are not converging. Without pairwise correlations the parameter MPlus flags is the intercept. With pairwise correlation it flags the correlations between time points 15 and 16

  • Checked the quadratic output for intercept and noticed some very high variances. I thus specified the model allowing the intercept variance to be freed instead of constrained
  • Increasing the number of start value attempts from default 10 2 to 50 5 (50 initial stage starts, 5 final stage optimisations), then 500 initial starts did not work
  • Fixing the intercept to 0,40 (variance) 7 (mean) did not work
  • made time interval references smaller: MPlus course taught us that models can fail to specify if the numbers that identify relative time intervals are too large. I made it so that 0.5 represented an interval of 2 weeks, instead of 1 THIS WORKED
Issue 5: 4 piece model with pairwise residuals correlated misspecifed (resolved)

Check indicators of model success and stability

Tabs to check that:
1. Any residual variance is positive. Significant negative residual variance would indicate a model error. 2. The loadings of indicators and intercepts are 1 3. Estimates late correctly to specific time points (i.e. the relative time references for each time point make sense and are accurate). 4. The intercept is zero for all time points 5. Model estimated correlations between time points look sensible

Output from each relevant file will be printed in each tab for review without needing MPlus software. You may need to scroll across to see full output.

Residuals

check if any residual variances are negative and significant (would indicate model error)

Linear

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_linear.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Linear with pairwise correlations

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_linear_withpairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_quadratic.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic with pairwise correlations

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_piecewise.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise with pairwise correlations

All variances are positive

model <- dep.traj.all$phq_latentGrowthCurve_piecewise_wPairwise_correlations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Loadings & Estimates

Check loadings of indicators and intercepts are 1, and estimates relate to specified time points (e.g. lin 0, 1, 2; quad 0, 1, 4)

Note that time references are relative. For most models run here, a difference of 1 refers to a gap of 2 weeks. Thus a difference of 2 refers to a gap of 4 weeks. For Quadratic models, a difference of 0.5 indicates a gap of 2 weeks, and a difference of 1 indicates a gap of 4 weeks. 0 is always the start of a trajectory, before we expect any change to occur. E.g. baseline would be 0 in a linear model.

So linear trajectories (given we are not including follow up time points 1 and 2, which occurred during our 2 week assessment phase) should have a time point reference that looks something like: 0, 3, 4, 5, 6, 7, 8, 9 (two weekly assessment time period ends here, four weeekly assessment period begins), 11, 13, 15, 17, 19, 21, 23, 25

Linear

All is fine

dep.traj.all$phq_latentGrowthCurve_linear.out$output[291:326]  %>%   str_split("#") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 3.000 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 5.000 0.000 999.000 999.000
x
PHQ_T6 6.000 0.000 999.000 999.000
x
PHQ_T7 7.000 0.000 999.000 999.000
x
PHQ_T8 8.000 0.000 999.000 999.000
x
PHQ_T9 9.000 0.000 999.000 999.000
x
PHQ_T10 11.000 0.000 999.000 999.000
x
PHQ_T11 13.000 0.000 999.000 999.000
x
PHQ_T12 15.000 0.000 999.000 999.000
x
PHQ_T13 17.000 0.000 999.000 999.000
x
PHQ_T14 19.000 0.000 999.000 999.000
x
PHQ_T15 21.000 0.000 999.000 999.000
x
PHQ_T16 23.000 0.000 999.000 999.000
x
PHQ_T17 25.000 0.000 999.000 999.000
Linear with pairwise correlations:

All is fine

dep.traj.all$phq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[295:330]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 3.000 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 5.000 0.000 999.000 999.000
x
PHQ_T6 6.000 0.000 999.000 999.000
x
PHQ_T7 7.000 0.000 999.000 999.000
x
PHQ_T8 8.000 0.000 999.000 999.000
x
PHQ_T9 9.000 0.000 999.000 999.000
x
PHQ_T10 11.000 0.000 999.000 999.000
x
PHQ_T11 13.000 0.000 999.000 999.000
x
PHQ_T12 15.000 0.000 999.000 999.000
x
PHQ_T13 17.000 0.000 999.000 999.000
x
PHQ_T14 19.000 0.000 999.000 999.000
x
PHQ_T15 21.000 0.000 999.000 999.000
x
PHQ_T16 23.000 0.000 999.000 999.000
x
PHQ_T17 25.000 0.000 999.000 999.000
x
Quadratic

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic.out$output[298:353]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
LIN |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 1.500 0.000 999.000 999.000
x
PHQ_T4 2.000 0.000 999.000 999.000
x
PHQ_T5 2.500 0.000 999.000 999.000
x
PHQ_T6 3.000 0.000 999.000 999.000
x
PHQ_T7 3.500 0.000 999.000 999.000
x
PHQ_T8 4.000 0.000 999.000 999.000
x
PHQ_T9 4.500 0.000 999.000 999.000
x
PHQ_T10 5.500 0.000 999.000 999.000
x
PHQ_T11 6.500 0.000 999.000 999.000
x
PHQ_T12 7.500 0.000 999.000 999.000
x
PHQ_T13 8.500 0.000 999.000 999.000
x
PHQ_T14 9.500 0.000 999.000 999.000
x
PHQ_T15 10.500 0.000 999.000 999.000
x
PHQ_T16 11.500 0.000 999.000 999.000
x
PHQ_T17 12.500 0.000 999.000 999.000
x
x
QUAD |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 2.250 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 6.250 0.000 999.000 999.000
x
PHQ_T6 9.000 0.000 999.000 999.000
x
PHQ_T7 12.250 0.000 999.000 999.000
x
PHQ_T8 16.000 0.000 999.000 999.000
x
PHQ_T9 20.250 0.000 999.000 999.000
x
PHQ_T10 30.250 0.000 999.000 999.000
x
PHQ_T11 42.250 0.000 999.000 999.000
x
PHQ_T12 56.250 0.000 999.000 999.000
x
PHQ_T13 72.250 0.000 999.000 999.000
x
PHQ_T14 90.250 0.000 999.000 999.000
x
PHQ_T15 110.250 0.000 999.000 999.000
x
PHQ_T16 132.250 0.000 999.000 999.000
x
PHQ_T17 156.250 0.000 999.000 999.000
x
Quadratic with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[297:352]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
LIN |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 1.500 0.000 999.000 999.000
x
PHQ_T4 2.000 0.000 999.000 999.000
x
PHQ_T5 2.500 0.000 999.000 999.000
x
PHQ_T6 3.000 0.000 999.000 999.000
x
PHQ_T7 3.500 0.000 999.000 999.000
x
PHQ_T8 4.000 0.000 999.000 999.000
x
PHQ_T9 4.500 0.000 999.000 999.000
x
PHQ_T10 5.500 0.000 999.000 999.000
x
PHQ_T11 6.500 0.000 999.000 999.000
x
PHQ_T12 7.500 0.000 999.000 999.000
x
PHQ_T13 8.500 0.000 999.000 999.000
x
PHQ_T14 9.500 0.000 999.000 999.000
x
PHQ_T15 10.500 0.000 999.000 999.000
x
PHQ_T16 11.500 0.000 999.000 999.000
x
PHQ_T17 12.500 0.000 999.000 999.000
x
x
QUAD |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 2.250 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 6.250 0.000 999.000 999.000
x
PHQ_T6 9.000 0.000 999.000 999.000
x
PHQ_T7 12.250 0.000 999.000 999.000
x
PHQ_T8 16.000 0.000 999.000 999.000
x
PHQ_T9 20.250 0.000 999.000 999.000
x
PHQ_T10 30.250 0.000 999.000 999.000
x
PHQ_T11 42.250 0.000 999.000 999.000
x
PHQ_T12 56.250 0.000 999.000 999.000
x
PHQ_T13 72.250 0.000 999.000 999.000
x
PHQ_T14 90.250 0.000 999.000 999.000
x
PHQ_T15 110.250 0.000 999.000 999.000
x
PHQ_T16 132.250 0.000 999.000 999.000
x
PHQ_T17 156.250 0.000 999.000 999.000
x
Piecewise

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise.out$output[341:432]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
LIN1 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 3.000 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 5.000 0.000 999.000 999.000
x
PHQ_T6 5.000 0.000 999.000 999.000
x
PHQ_T7 5.000 0.000 999.000 999.000
x
PHQ_T8 5.000 0.000 999.000 999.000
x
PHQ_T9 5.000 0.000 999.000 999.000
x
PHQ_T10 5.000 0.000 999.000 999.000
x
PHQ_T11 5.000 0.000 999.000 999.000
x
PHQ_T12 5.000 0.000 999.000 999.000
x
PHQ_T13 5.000 0.000 999.000 999.000
x
PHQ_T14 5.000 0.000 999.000 999.000
x
PHQ_T15 5.000 0.000 999.000 999.000
x
PHQ_T16 5.000 0.000 999.000 999.000
x
PHQ_T17 5.000 0.000 999.000 999.000
x
x
LIN2 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 2.000 0.000 999.000 999.000
x
PHQ_T8 3.000 0.000 999.000 999.000
x
PHQ_T9 4.000 0.000 999.000 999.000
x
PHQ_T10 6.000 0.000 999.000 999.000
x
PHQ_T11 8.000 0.000 999.000 999.000
x
PHQ_T12 8.000 0.000 999.000 999.000
x
PHQ_T13 8.000 0.000 999.000 999.000
x
PHQ_T14 8.000 0.000 999.000 999.000
x
PHQ_T15 8.000 0.000 999.000 999.000
x
PHQ_T16 8.000 0.000 999.000 999.000
x
PHQ_T17 8.000 0.000 999.000 999.000
x
x
LIN3 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 2.000 0.000 999.000 999.000
x
PHQ_T13 4.000 0.000 999.000 999.000
x
PHQ_T14 6.000 0.000 999.000 999.000
x
PHQ_T15 8.000 0.000 999.000 999.000
x
PHQ_T16 8.000 0.000 999.000 999.000
x
PHQ_T17 8.000 0.000 999.000 999.000
x
x
LIN4 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 2.000 0.000 999.000 999.000
x
PHQ_T17 4.000 0.000 999.000 999.000
x
Piecewise with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[345:436]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
PHQ_T0 1.000 0.000 999.000 999.000
x
PHQ_T3 1.000 0.000 999.000 999.000
x
PHQ_T4 1.000 0.000 999.000 999.000
x
PHQ_T5 1.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 1.000 0.000 999.000 999.000
x
PHQ_T8 1.000 0.000 999.000 999.000
x
PHQ_T9 1.000 0.000 999.000 999.000
x
PHQ_T10 1.000 0.000 999.000 999.000
x
PHQ_T11 1.000 0.000 999.000 999.000
x
PHQ_T12 1.000 0.000 999.000 999.000
x
PHQ_T13 1.000 0.000 999.000 999.000
x
PHQ_T14 1.000 0.000 999.000 999.000
x
PHQ_T15 1.000 0.000 999.000 999.000
x
PHQ_T16 1.000 0.000 999.000 999.000
x
PHQ_T17 1.000 0.000 999.000 999.000
x
x
LIN1 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 3.000 0.000 999.000 999.000
x
PHQ_T4 4.000 0.000 999.000 999.000
x
PHQ_T5 5.000 0.000 999.000 999.000
x
PHQ_T6 5.000 0.000 999.000 999.000
x
PHQ_T7 5.000 0.000 999.000 999.000
x
PHQ_T8 5.000 0.000 999.000 999.000
x
PHQ_T9 5.000 0.000 999.000 999.000
x
PHQ_T10 5.000 0.000 999.000 999.000
x
PHQ_T11 5.000 0.000 999.000 999.000
x
PHQ_T12 5.000 0.000 999.000 999.000
x
PHQ_T13 5.000 0.000 999.000 999.000
x
PHQ_T14 5.000 0.000 999.000 999.000
x
PHQ_T15 5.000 0.000 999.000 999.000
x
PHQ_T16 5.000 0.000 999.000 999.000
x
PHQ_T17 5.000 0.000 999.000 999.000
x
x
LIN2 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 1.000 0.000 999.000 999.000
x
PHQ_T7 2.000 0.000 999.000 999.000
x
PHQ_T8 3.000 0.000 999.000 999.000
x
PHQ_T9 4.000 0.000 999.000 999.000
x
PHQ_T10 6.000 0.000 999.000 999.000
x
PHQ_T11 8.000 0.000 999.000 999.000
x
PHQ_T12 8.000 0.000 999.000 999.000
x
PHQ_T13 8.000 0.000 999.000 999.000
x
PHQ_T14 8.000 0.000 999.000 999.000
x
PHQ_T15 8.000 0.000 999.000 999.000
x
PHQ_T16 8.000 0.000 999.000 999.000
x
PHQ_T17 8.000 0.000 999.000 999.000
x
x
LIN3 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 2.000 0.000 999.000 999.000
x
PHQ_T13 4.000 0.000 999.000 999.000
x
PHQ_T14 6.000 0.000 999.000 999.000
x
PHQ_T15 8.000 0.000 999.000 999.000
x
PHQ_T16 8.000 0.000 999.000 999.000
x
PHQ_T17 8.000 0.000 999.000 999.000
x
x
LIN4 |
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 2.000 0.000 999.000 999.000
x
PHQ_T17 4.000 0.000 999.000 999.000
x
Intercepts

check intercept 0 for all time points

Linear

All is fine

dep.traj.all$phq_latentGrowthCurve_linear.out$output[427:444]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
x
Linear with pairwise correlations:

All is fine

dep.traj.all$phq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[383:400]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
x
Quadratic

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic.out$output[366:383]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
x
Quadratic with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[407:423]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
Piecewise

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise.out$output[458:475]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
x
Piecewise with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[507:524]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
PHQ_T0 0.000 0.000 999.000 999.000
x
PHQ_T3 0.000 0.000 999.000 999.000
x
PHQ_T4 0.000 0.000 999.000 999.000
x
PHQ_T5 0.000 0.000 999.000 999.000
x
PHQ_T6 0.000 0.000 999.000 999.000
x
PHQ_T7 0.000 0.000 999.000 999.000
x
PHQ_T8 0.000 0.000 999.000 999.000
x
PHQ_T9 0.000 0.000 999.000 999.000
x
PHQ_T10 0.000 0.000 999.000 999.000
x
PHQ_T11 0.000 0.000 999.000 999.000
x
PHQ_T12 0.000 0.000 999.000 999.000
x
PHQ_T13 0.000 0.000 999.000 999.000
x
PHQ_T14 0.000 0.000 999.000 999.000
x
PHQ_T15 0.000 0.000 999.000 999.000
x
PHQ_T16 0.000 0.000 999.000 999.000
x
PHQ_T17 0.000 0.000 999.000 999.000
x
Correlations

Check that the model estimated correlations between all time points looks sensible.

Linear

All is fine

dep.traj.all$phq_latentGrowthCurve_linear.out$output[653:698]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.831 1.000
x
PHQ_T4 0.836 0.871 1.000
x
PHQ_T5 0.834 0.870 0.878 1.000
x
PHQ_T6 0.830 0.868 0.876 0.876 1.000
x
PHQ_T7 0.824 0.863 0.871 0.872 0.872
x
PHQ_T8 0.816 0.855 0.864 0.866 0.866
x
PHQ_T9 0.808 0.848 0.857 0.859 0.860
x
PHQ_T10 0.796 0.839 0.849 0.852 0.853
x
PHQ_T11 0.788 0.833 0.844 0.848 0.850
x
PHQ_T12 0.777 0.824 0.836 0.841 0.844
x
PHQ_T13 0.769 0.818 0.831 0.837 0.841
x
PHQ_T14 0.755 0.807 0.820 0.827 0.832
x
PHQ_T15 0.745 0.798 0.813 0.820 0.826
x
PHQ_T16 0.731 0.786 0.801 0.809 0.816
x
PHQ_T17 0.711 0.768 0.783 0.792 0.800
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.863 1.000
x
PHQ_T9 0.858 0.853 1.000
x
PHQ_T10 0.852 0.848 0.845 1.000
x
PHQ_T11 0.850 0.847 0.844 0.844 1.000
x
PHQ_T12 0.844 0.843 0.841 0.842 0.848
x
PHQ_T13 0.842 0.841 0.841 0.844 0.851
x
PHQ_T14 0.834 0.834 0.834 0.839 0.848
x
PHQ_T15 0.829 0.830 0.831 0.838 0.848
x
PHQ_T16 0.820 0.822 0.824 0.832 0.844
x
PHQ_T17 0.805 0.807 0.810 0.820 0.834
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.854 1.000
x
PHQ_T14 0.854 0.862 1.000
x
PHQ_T15 0.855 0.865 0.870 1.000
x
PHQ_T16 0.853 0.865 0.870 0.879 1.000
x
PHQ_T17 0.844 0.857 0.864 0.874 0.880
Linear with pairwise correlations:

All is fine

dep.traj.all$phq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[746:792]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.871 1.000
x
PHQ_T4 0.827 0.892 1.000
x
PHQ_T5 0.825 0.854 0.893 1.000
x
PHQ_T6 0.823 0.853 0.866 0.898 1.000
x
PHQ_T7 0.818 0.849 0.862 0.862 0.895
x
PHQ_T8 0.811 0.843 0.857 0.857 0.858
x
PHQ_T9 0.805 0.838 0.851 0.853 0.854
x
PHQ_T10 0.795 0.830 0.844 0.846 0.848
x
PHQ_T11 0.789 0.826 0.840 0.843 0.846
x
PHQ_T12 0.780 0.818 0.833 0.837 0.840
x
PHQ_T13 0.775 0.815 0.831 0.835 0.839
x
PHQ_T14 0.764 0.805 0.822 0.826 0.831
x
PHQ_T15 0.755 0.798 0.815 0.820 0.826
x
PHQ_T16 0.745 0.790 0.807 0.813 0.819
x
PHQ_T17 0.734 0.780 0.798 0.804 0.811
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.900 1.000
x
PHQ_T9 0.852 0.875 1.000
x
PHQ_T10 0.846 0.843 0.880 1.000
x
PHQ_T11 0.845 0.843 0.841 0.876 1.000
x
PHQ_T12 0.840 0.839 0.838 0.838 0.876
x
PHQ_T13 0.840 0.839 0.839 0.840 0.846
x
PHQ_T14 0.833 0.833 0.833 0.836 0.842
x
PHQ_T15 0.828 0.828 0.829 0.833 0.842
x
PHQ_T16 0.822 0.823 0.825 0.830 0.840
x
PHQ_T17 0.815 0.817 0.819 0.826 0.836
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.881 1.000
x
PHQ_T14 0.846 0.874 1.000
x
PHQ_T15 0.846 0.855 0.887 1.000
x
PHQ_T16 0.846 0.856 0.859 0.890 1.000
x
PHQ_T17 0.844 0.855 0.860 0.866 0.895
x
Quadratic

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic.out$output[709:762]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.850 1.000
x
PHQ_T4 0.843 0.878 1.000
x
PHQ_T5 0.832 0.873 0.877 1.000
x
PHQ_T6 0.821 0.867 0.873 0.874 1.000
x
PHQ_T7 0.809 0.860 0.868 0.870 0.871
x
PHQ_T8 0.795 0.852 0.861 0.864 0.866
x
PHQ_T9 0.783 0.843 0.853 0.858 0.861
x
PHQ_T10 0.765 0.831 0.843 0.850 0.855
x
PHQ_T11 0.753 0.823 0.836 0.844 0.851
x
PHQ_T12 0.743 0.813 0.828 0.836 0.844
x
PHQ_T13 0.740 0.810 0.824 0.833 0.840
x
PHQ_T14 0.736 0.803 0.816 0.824 0.832
x
PHQ_T15 0.740 0.802 0.814 0.821 0.828
x
PHQ_T16 0.744 0.799 0.810 0.815 0.820
x
PHQ_T17 0.744 0.789 0.797 0.800 0.803
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.867 1.000
x
PHQ_T9 0.863 0.861 1.000
x
PHQ_T10 0.858 0.858 0.857 1.000
x
PHQ_T11 0.855 0.856 0.856 0.859 1.000
x
PHQ_T12 0.848 0.850 0.851 0.856 0.861
x
PHQ_T13 0.845 0.848 0.849 0.855 0.861
x
PHQ_T14 0.836 0.839 0.840 0.847 0.854
x
PHQ_T15 0.832 0.834 0.835 0.842 0.850
x
PHQ_T16 0.824 0.825 0.826 0.832 0.841
x
PHQ_T17 0.805 0.805 0.805 0.811 0.820
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.863 1.000
x
PHQ_T14 0.857 0.864 1.000
x
PHQ_T15 0.855 0.864 0.867 1.000
x
PHQ_T16 0.848 0.860 0.867 0.880 1.000
x
PHQ_T17 0.829 0.844 0.855 0.873 0.890
x
x
x
Model Estimated Correlations
x
PHQ_T17
x
________
x
PHQ_T17 1.000
x
x
Quadratic with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[792:844]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.869 1.000
x
PHQ_T4 0.837 0.894 1.000
x
PHQ_T5 0.829 0.856 0.892 1.000
x
PHQ_T6 0.821 0.853 0.864 0.897 1.000
x
PHQ_T7 0.812 0.848 0.859 0.860 0.895
x
PHQ_T8 0.803 0.841 0.854 0.856 0.858
x
PHQ_T9 0.793 0.835 0.848 0.851 0.854
x
PHQ_T10 0.779 0.825 0.840 0.844 0.849
x
PHQ_T11 0.769 0.818 0.834 0.840 0.845
x
PHQ_T12 0.760 0.810 0.826 0.832 0.839
x
PHQ_T13 0.757 0.808 0.824 0.830 0.837
x
PHQ_T14 0.751 0.799 0.815 0.822 0.828
x
PHQ_T15 0.751 0.796 0.811 0.817 0.823
x
PHQ_T16 0.758 0.798 0.812 0.817 0.822
x
PHQ_T17 0.761 0.795 0.808 0.811 0.814
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.900 1.000
x
PHQ_T9 0.855 0.877 1.000
x
PHQ_T10 0.850 0.851 0.882 1.000
x
PHQ_T11 0.848 0.849 0.849 0.879 1.000
x
PHQ_T12 0.842 0.844 0.844 0.847 0.879
x
PHQ_T13 0.841 0.843 0.844 0.848 0.853
x
PHQ_T14 0.832 0.834 0.835 0.840 0.846
x
PHQ_T15 0.826 0.828 0.830 0.835 0.842
x
PHQ_T16 0.825 0.826 0.827 0.832 0.840
x
PHQ_T17 0.816 0.817 0.818 0.823 0.831
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.883 1.000
x
PHQ_T14 0.848 0.875 1.000
x
PHQ_T15 0.845 0.854 0.888 1.000
x
PHQ_T16 0.846 0.857 0.861 0.891 1.000
x
PHQ_T17 0.838 0.852 0.859 0.872 0.891
x
x
x
Model Estimated Correlations
x
PHQ_T17
x
________
x
PHQ_T17 1.000
x
Piecewise

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise.out$output[854:906]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.869 1.000
x
PHQ_T4 0.844 0.875 1.000
x
PHQ_T5 0.814 0.871 0.888 1.000
x
PHQ_T6 0.814 0.867 0.884 0.895 1.000
x
PHQ_T7 0.808 0.859 0.874 0.885 0.885
x
PHQ_T8 0.800 0.848 0.862 0.872 0.875
x
PHQ_T9 0.792 0.837 0.850 0.859 0.865
x
PHQ_T10 0.781 0.819 0.831 0.838 0.848
x
PHQ_T11 0.767 0.800 0.809 0.815 0.830
x
PHQ_T12 0.768 0.800 0.809 0.813 0.827
x
PHQ_T13 0.772 0.802 0.811 0.815 0.827
x
PHQ_T14 0.772 0.800 0.808 0.812 0.822
x
PHQ_T15 0.775 0.802 0.809 0.812 0.821
x
PHQ_T16 0.766 0.797 0.805 0.809 0.818
x
PHQ_T17 0.760 0.794 0.804 0.810 0.818
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.872 1.000
x
PHQ_T9 0.865 0.862 1.000
x
PHQ_T10 0.854 0.857 0.860 1.000
x
PHQ_T11 0.841 0.849 0.857 0.877 1.000
x
PHQ_T12 0.836 0.842 0.849 0.865 0.879
x
PHQ_T13 0.834 0.838 0.843 0.856 0.867
x
PHQ_T14 0.827 0.830 0.833 0.843 0.850
x
PHQ_T15 0.824 0.826 0.827 0.833 0.837
x
PHQ_T16 0.822 0.823 0.824 0.831 0.835
x
PHQ_T17 0.822 0.823 0.825 0.831 0.835
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.868 1.000
x
PHQ_T14 0.859 0.871 1.000
x
PHQ_T15 0.855 0.874 0.890 1.000
x
PHQ_T16 0.847 0.862 0.872 0.886 1.000
x
PHQ_T17 0.843 0.852 0.858 0.866 0.894
x
x
x
Model Estimated Correlations
x
PHQ_T17
x
________
x
PHQ_T17 1.000
x
Piecewise with pairwise correlations

All is fine

dep.traj.all$phq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[948:1000]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
PHQ_T0 PHQ_T3 PHQ_T4 PHQ_T5 PHQ_T6
x
________ ________ ________ ________ ________
x
PHQ_T0 1.000
x
PHQ_T3 0.872 1.000
x
PHQ_T4 0.845 0.897 1.000
x
PHQ_T5 0.817 0.862 0.895 1.000
x
PHQ_T6 0.814 0.858 0.873 0.901 1.000
x
PHQ_T7 0.808 0.849 0.863 0.876 0.899
x
PHQ_T8 0.801 0.840 0.854 0.866 0.866
x
PHQ_T9 0.794 0.831 0.844 0.855 0.858
x
PHQ_T10 0.783 0.816 0.828 0.838 0.845
x
PHQ_T11 0.773 0.802 0.813 0.821 0.833
x
PHQ_T12 0.771 0.799 0.809 0.818 0.828
x
PHQ_T13 0.773 0.801 0.811 0.819 0.828
x
PHQ_T14 0.772 0.798 0.808 0.815 0.823
x
PHQ_T15 0.773 0.798 0.808 0.815 0.822
x
PHQ_T16 0.769 0.794 0.804 0.811 0.818
x
PHQ_T17 0.766 0.792 0.801 0.808 0.815
x
x
x
Model Estimated Correlations
x
PHQ_T7 PHQ_T8 PHQ_T9 PHQ_T10 PHQ_T11
x
________ ________ ________ ________ ________
x
PHQ_T7 1.000
x
PHQ_T8 0.902 1.000
x
PHQ_T9 0.856 0.878 1.000
x
PHQ_T10 0.847 0.850 0.883 1.000
x
PHQ_T11 0.839 0.846 0.852 0.880 1.000
x
PHQ_T12 0.833 0.839 0.844 0.857 0.882
x
PHQ_T13 0.832 0.836 0.840 0.852 0.864
x
PHQ_T14 0.827 0.830 0.833 0.842 0.852
x
PHQ_T15 0.824 0.827 0.829 0.836 0.844
x
PHQ_T16 0.820 0.822 0.824 0.832 0.840
x
PHQ_T17 0.817 0.820 0.822 0.829 0.837
x
x
x
Model Estimated Correlations
x
PHQ_T12 PHQ_T13 PHQ_T14 PHQ_T15 PHQ_T16
x
________ ________ ________ ________ ________
x
PHQ_T12 1.000
x
PHQ_T13 0.885 1.000
x
PHQ_T14 0.854 0.878 1.000
x
PHQ_T15 0.850 0.861 0.889 1.000
x
PHQ_T16 0.846 0.857 0.863 0.892 1.000
x
PHQ_T17 0.843 0.854 0.860 0.870 0.895
x
x
x
Model Estimated Correlations
x
PHQ_T17
x
________
x
PHQ_T17 1.000
x

Summary table of all fit indices

Sorted by BIC, as this is the most informative criteria (as per Muthens)

justSummaries <- do.call("rbind.fill",
  sapply(dep.traj.all ,"[", "summaries")) %>%
  select(c("Title", "Observations", "Parameters", "AIC", "BIC", "CFI", "TLI", "SRMR", "RMSEA_Estimate")) %>%
  arrange(BIC)

justSummaries %>%
  kbl() %>%
  kable_styling()
Title Observations Parameters AIC BIC CFI TLI SRMR RMSEA_Estimate
Depression symptoms in RAMP and COPING piecewise trajectories With pairwise correlations 42006 46 1770170 1770568 0.995 0.994 0.009 0.015
Depression symptoms in RAMP and COPING Quadratic Growth Curve With pairwise correlations 42006 39 1772577 1772914 0.989 0.988 0.013 0.022
Depression symptoms in RAMP and COPING Linear Growth Curve With pairwise correlations 42006 36 1774121 1774432 0.985 0.984 0.016 0.025
Depression symptoms in RAMP and COPING piecewise trajectory No pairwise correlations 42006 36 1774531 1774842 0.985 0.984 0.010 0.025
Depression symptoms in RAMP and COPING Quadratic Growth Curve No pairwise correlations 42006 25 1781344 1781560 0.968 0.970 0.017 0.035
Depression symptoms in RAMP and COPING Linear Growth Curve No pairwise correlations 42006 21 1786100 1786282 0.956 0.960 0.021 0.040

Plots

I show the plots for all runs. Output for all runs is available in the GMM folder on GitHub to review input and output data that generated these plots.

  1. Observed (dashed lines) and estimated (solid lines) means for best fit trajectory only
  2. Observed and estimated means: Showing model estimated means from linear, quadratic, and piecewise trajectories (solid lines) overlaid on the observed means from our sample (dashed line)
  3. Plot estimated mean trajectories for every model run (with and without pairwise correlations)
  4. plot estimated mean trajectories for the best of each pair of model (i.e. only including te version of the model where contiguous time point residuals were allowed to correlate as these were the best fit for the data)

Best model: Observed and estimated means

Showing model estimated means from piecewise trajectories with pairwise correlations between contiguous time points (solid lines) overlaid on the observed means from our sample (dashed line)

growth_curves_best <- ggplot() +
  geom_line(data = dat_dep_best,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_dep_best,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="PHQ9 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(6,10), breaks=seq(6, 10, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
        hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_best

Observed and estimated means

Showing model estimated means from linear, quadratic, and piecewise trajectories (solid lines) overlaid on the observed means from our sample (dashed line) Only showing trajectories that included pairwise correlations between residuals for contiguous time points. This was the best fit for the data.

growth_curves_run2c <- ggplot() +
  geom_line(data = dat_dep_run_2c,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_dep_run_2c,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="PHQ9 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(6,10), breaks=seq(6, 10, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
        hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2c

All models

Plotting the estimated means for the trajectories with adjacent residuals correlated as these all had better fit than uncorrelated models

growth_curves_run2 <- ggplot() +
  geom_line(data = dat_dep_run_2,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_dep_run_2,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="PHQ9 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(6,10), breaks=seq(6, 10, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2

Best model from each trajectory type

Show model that performs best of each pair of models (with or without residual correlations between contiguous data points)

Linear: with correlations quadratic: with correlations Piecewise: with correlations

Growth Curve Plot
growth_curves_run2b <- ggplot() +
  geom_line(data = dat_dep_run_2b,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_dep_run_2b,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette[c(4, 1:3)]) +
  labs(x = "Follow up time point", y ="PHQ9 Score") +
    scale_y_continuous(expand = c(0,0), limits = c(6,10), breaks=seq(6, 10, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2b

GAD7: Current Anxiety Symptoms Latent Growth Curve Model

Data summary

gad_check <-  readRDS("../../../data_clean/gad/gad.clean_merged_total_scores.rds")

# get a list of the total score columns
total_cols <- grep("total_Wave", names(gad_check))

#count how many columns we have
n_cols <- length(total_cols)

# create a list of how many NAs are missing across these 18 columns per row
list_n_missing <- apply(gad_check[total_cols],1,function(x) sum(is.na(x)))

# count how many people are missing data for all columns (NA = total_cols)
list_all_missing <-  sum(list_n_missing ==n_cols)

print(dim(gad_check)[1])

[1] 52414

print(list_all_missing)

[1] 10968

run all models

dont rerun models if there is already output for it (to save computational time), do show the output in the console

Note:

runModels("./MPlus_input_lcga/gad", 
          recursive = FALSE,
          showOutput=TRUE,
          replaceOutfile="never")

Examine model output

this reads in all output, including the gh5 plot files

anx.traj.all <- readModels("./MPlus_input_lcga/gad", 
                           recursive=FALSE)

Check warnings and error messages

  • warnings
  • that none of the residual variances are negative and significant
  • loadings of indicators and intercept should all be 1, and estimates should relate to the time points you specified (e.g. lin 0, 1, 2; quad 0, 1, 4)
  • intercept 0 for all and correlations look sensible
warnings

at the moment this doesnt say which model the warning is from, so any warning requires checking to identify its source. Though order in list will give some indication

justWarnings <- do.call("paste",
  sapply(anx.traj.all ,"[", "warnings"))

justWarnings

[1] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("All continuous latent variable covariances involving LIN4 have been fixed to 0", "because the variance of LIN4 is fixed at 0.") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”
[2] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "2 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 10969", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”

Warnings are all about missing data (missing on all obs, this number lines up with our expectations from the dataset in the section above)

Otherwise, no warnings. Check one complete.

errors

No errors occurred. Used the same alterations as for PHQ (see above)

Check any errors with running any of the models. Output here will not say which model it belongs to, so will need to manually examine if errors occur,

justErrors <- do.call("paste",
  sapply(anx.traj.all ,"[", "errors"))

justErrors

character(0)

Check indicators of model success and stability

Tabs to check that:
1. Any residual variance is positive. Significant negative residual variance would indicate a model error. 2. The loadings of indicators and intercepts are 1 3. Estimates late correctly to specific time points (i.e. the relative time references for each time point make sense and are accurate). 4. The intercept is zero for all time points 5. Model estimated correlations between time points look sensible

Output from each relevant file will be printed in each tab for review without needing MPlus software. You may need to scroll across to see full output.

Residuals

check if any residual variances are negative and significant (would indicate model error) ###### Linear All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_linear.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Linear with pairwise correlations

All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_linear_withpairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic

All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_quadratic.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic with pairwise correlations

All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise

All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_piecewise.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise with pairwise correlations

All variances are positive

model <- anx.traj.all$gad_latentGrowthCurve_piecewise_wPairwise_correlations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Loadings & Estimates

Check loadings of indicators and intercepts are 1, and estimates relate to specified time points (e.g. lin 0, 1, 2; quad 0, 1, 4)

Note that time references are relative. For most models run here, a difference of 1 refers to a gap of 2 weeks. Thus a difference of 2 refers to a gap of 4 weeks. For Quadratic models, a difference of 0.5 indicates a gap of 2 weeks, and a difference of 1 indicates a gap of 4 weeks. 0 is always the start of a trajectory, before we expect any change to occur. E.g. baseline would be 0 in a linear model.

So linear trajectories (given we are not including follow up time points 1 and 2, which occurred during our 2 week assessment phase) should have a time point reference that looks something like: 0, 3, 4, 5, 6, 7, 8, 9 (two weekly assessment time period ends here, four weeekly assessment period begins), 11, 13, 15, 17, 19, 21, 23, 25

Linear

All is fine

anx.traj.all$gad_latentGrowthCurve_linear.out$output[290:327] %>%
  str_split("/t") %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
GAD_T0 1.000 0.000 999.000 999.000
x
GAD_T3 1.000 0.000 999.000 999.000
x
GAD_T4 1.000 0.000 999.000 999.000
x
GAD_T5 1.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 1.000 0.000 999.000 999.000
x
GAD_T8 1.000 0.000 999.000 999.000
x
GAD_T9 1.000 0.000 999.000 999.000
x
GAD_T10 1.000 0.000 999.000 999.000
x
GAD_T11 1.000 0.000 999.000 999.000
x
GAD_T12 1.000 0.000 999.000 999.000
x
GAD_T13 1.000 0.000 999.000 999.000
x
GAD_T14 1.000 0.000 999.000 999.000
x
GAD_T15 1.000 0.000 999.000 999.000
x
GAD_T16 1.000 0.000 999.000 999.000
x
GAD_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 3.000 0.000 999.000 999.000
x
GAD_T4 4.000 0.000 999.000 999.000
x
GAD_T5 5.000 0.000 999.000 999.000
x
GAD_T6 6.000 0.000 999.000 999.000
x
GAD_T7 7.000 0.000 999.000 999.000
x
GAD_T8 8.000 0.000 999.000 999.000
x
GAD_T9 9.000 0.000 999.000 999.000
x
GAD_T10 11.000 0.000 999.000 999.000
x
GAD_T11 13.000 0.000 999.000 999.000
x
GAD_T12 15.000 0.000 999.000 999.000
x
GAD_T13 17.000 0.000 999.000 999.000
x
GAD_T14 19.000 0.000 999.000 999.000
x
GAD_T15 21.000 0.000 999.000 999.000
x
GAD_T16 23.000 0.000 999.000 999.000
x
GAD_T17 25.000 0.000 999.000 999.000
x
Linear with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[293:330]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
GAD_T0 1.000 0.000 999.000 999.000
x
GAD_T3 1.000 0.000 999.000 999.000
x
GAD_T4 1.000 0.000 999.000 999.000
x
GAD_T5 1.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 1.000 0.000 999.000 999.000
x
GAD_T8 1.000 0.000 999.000 999.000
x
GAD_T9 1.000 0.000 999.000 999.000
x
GAD_T10 1.000 0.000 999.000 999.000
x
GAD_T11 1.000 0.000 999.000 999.000
x
GAD_T12 1.000 0.000 999.000 999.000
x
GAD_T13 1.000 0.000 999.000 999.000
x
GAD_T14 1.000 0.000 999.000 999.000
x
GAD_T15 1.000 0.000 999.000 999.000
x
GAD_T16 1.000 0.000 999.000 999.000
x
GAD_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 3.000 0.000 999.000 999.000
x
GAD_T4 4.000 0.000 999.000 999.000
x
GAD_T5 5.000 0.000 999.000 999.000
x
GAD_T6 6.000 0.000 999.000 999.000
x
GAD_T7 7.000 0.000 999.000 999.000
x
GAD_T8 8.000 0.000 999.000 999.000
x
GAD_T9 9.000 0.000 999.000 999.000
x
GAD_T10 11.000 0.000 999.000 999.000
x
GAD_T11 13.000 0.000 999.000 999.000
x
GAD_T12 15.000 0.000 999.000 999.000
x
GAD_T13 17.000 0.000 999.000 999.000
x
GAD_T14 19.000 0.000 999.000 999.000
x
GAD_T15 21.000 0.000 999.000 999.000
x
GAD_T16 23.000 0.000 999.000 999.000
x
GAD_T17 25.000 0.000 999.000 999.000
x
Quadratic

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic.out$output[298:353]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
GAD_T0 1.000 0.000 999.000 999.000
x
GAD_T3 1.000 0.000 999.000 999.000
x
GAD_T4 1.000 0.000 999.000 999.000
x
GAD_T5 1.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 1.000 0.000 999.000 999.000
x
GAD_T8 1.000 0.000 999.000 999.000
x
GAD_T9 1.000 0.000 999.000 999.000
x
GAD_T10 1.000 0.000 999.000 999.000
x
GAD_T11 1.000 0.000 999.000 999.000
x
GAD_T12 1.000 0.000 999.000 999.000
x
GAD_T13 1.000 0.000 999.000 999.000
x
GAD_T14 1.000 0.000 999.000 999.000
x
GAD_T15 1.000 0.000 999.000 999.000
x
GAD_T16 1.000 0.000 999.000 999.000
x
GAD_T17 1.000 0.000 999.000 999.000
x
x
LIN |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 1.500 0.000 999.000 999.000
x
GAD_T4 2.000 0.000 999.000 999.000
x
GAD_T5 2.500 0.000 999.000 999.000
x
GAD_T6 3.000 0.000 999.000 999.000
x
GAD_T7 3.500 0.000 999.000 999.000
x
GAD_T8 4.000 0.000 999.000 999.000
x
GAD_T9 4.500 0.000 999.000 999.000
x
GAD_T10 5.500 0.000 999.000 999.000
x
GAD_T11 6.500 0.000 999.000 999.000
x
GAD_T12 7.500 0.000 999.000 999.000
x
GAD_T13 8.500 0.000 999.000 999.000
x
GAD_T14 9.500 0.000 999.000 999.000
x
GAD_T15 10.500 0.000 999.000 999.000
x
GAD_T16 11.500 0.000 999.000 999.000
x
GAD_T17 12.500 0.000 999.000 999.000
x
x
QUAD |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 2.250 0.000 999.000 999.000
x
GAD_T4 4.000 0.000 999.000 999.000
x
GAD_T5 6.250 0.000 999.000 999.000
x
GAD_T6 9.000 0.000 999.000 999.000
x
GAD_T7 12.250 0.000 999.000 999.000
x
GAD_T8 16.000 0.000 999.000 999.000
x
GAD_T9 20.250 0.000 999.000 999.000
x
GAD_T10 30.250 0.000 999.000 999.000
x
GAD_T11 42.250 0.000 999.000 999.000
x
GAD_T12 56.250 0.000 999.000 999.000
x
GAD_T13 72.250 0.000 999.000 999.000
x
GAD_T14 90.250 0.000 999.000 999.000
x
GAD_T15 110.250 0.000 999.000 999.000
x
GAD_T16 132.250 0.000 999.000 999.000
x
GAD_T17 156.250 0.000 999.000 999.000
x
Quadratic with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[297:352]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
GAD_T0 1.000 0.000 999.000 999.000
x
GAD_T3 1.000 0.000 999.000 999.000
x
GAD_T4 1.000 0.000 999.000 999.000
x
GAD_T5 1.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 1.000 0.000 999.000 999.000
x
GAD_T8 1.000 0.000 999.000 999.000
x
GAD_T9 1.000 0.000 999.000 999.000
x
GAD_T10 1.000 0.000 999.000 999.000
x
GAD_T11 1.000 0.000 999.000 999.000
x
GAD_T12 1.000 0.000 999.000 999.000
x
GAD_T13 1.000 0.000 999.000 999.000
x
GAD_T14 1.000 0.000 999.000 999.000
x
GAD_T15 1.000 0.000 999.000 999.000
x
GAD_T16 1.000 0.000 999.000 999.000
x
GAD_T17 1.000 0.000 999.000 999.000
x
x
LIN |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 1.500 0.000 999.000 999.000
x
GAD_T4 2.000 0.000 999.000 999.000
x
GAD_T5 2.500 0.000 999.000 999.000
x
GAD_T6 3.000 0.000 999.000 999.000
x
GAD_T7 3.500 0.000 999.000 999.000
x
GAD_T8 4.000 0.000 999.000 999.000
x
GAD_T9 4.500 0.000 999.000 999.000
x
GAD_T10 5.500 0.000 999.000 999.000
x
GAD_T11 6.500 0.000 999.000 999.000
x
GAD_T12 7.500 0.000 999.000 999.000
x
GAD_T13 8.500 0.000 999.000 999.000
x
GAD_T14 9.500 0.000 999.000 999.000
x
GAD_T15 10.500 0.000 999.000 999.000
x
GAD_T16 11.500 0.000 999.000 999.000
x
GAD_T17 12.500 0.000 999.000 999.000
x
x
QUAD |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 2.250 0.000 999.000 999.000
x
GAD_T4 4.000 0.000 999.000 999.000
x
GAD_T5 6.250 0.000 999.000 999.000
x
GAD_T6 9.000 0.000 999.000 999.000
x
GAD_T7 12.250 0.000 999.000 999.000
x
GAD_T8 16.000 0.000 999.000 999.000
x
GAD_T9 20.250 0.000 999.000 999.000
x
GAD_T10 30.250 0.000 999.000 999.000
x
GAD_T11 42.250 0.000 999.000 999.000
x
GAD_T12 56.250 0.000 999.000 999.000
x
GAD_T13 72.250 0.000 999.000 999.000
x
GAD_T14 90.250 0.000 999.000 999.000
x
GAD_T15 110.250 0.000 999.000 999.000
x
GAD_T16 132.250 0.000 999.000 999.000
x
GAD_T17 156.250 0.000 999.000 999.000
x
Piecewise

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise.out$output[340:432]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Two-Tailed
x
Estimate S.E. Est./S.E. P-Value
x
x
INT |
x
GAD_T0 1.000 0.000 999.000 999.000
x
GAD_T3 1.000 0.000 999.000 999.000
x
GAD_T4 1.000 0.000 999.000 999.000
x
GAD_T5 1.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 1.000 0.000 999.000 999.000
x
GAD_T8 1.000 0.000 999.000 999.000
x
GAD_T9 1.000 0.000 999.000 999.000
x
GAD_T10 1.000 0.000 999.000 999.000
x
GAD_T11 1.000 0.000 999.000 999.000
x
GAD_T12 1.000 0.000 999.000 999.000
x
GAD_T13 1.000 0.000 999.000 999.000
x
GAD_T14 1.000 0.000 999.000 999.000
x
GAD_T15 1.000 0.000 999.000 999.000
x
GAD_T16 1.000 0.000 999.000 999.000
x
GAD_T17 1.000 0.000 999.000 999.000
x
x
LIN1 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 3.000 0.000 999.000 999.000
x
GAD_T4 4.000 0.000 999.000 999.000
x
GAD_T5 5.000 0.000 999.000 999.000
x
GAD_T6 5.000 0.000 999.000 999.000
x
GAD_T7 5.000 0.000 999.000 999.000
x
GAD_T8 5.000 0.000 999.000 999.000
x
GAD_T9 5.000 0.000 999.000 999.000
x
GAD_T10 5.000 0.000 999.000 999.000
x
GAD_T11 5.000 0.000 999.000 999.000
x
GAD_T12 5.000 0.000 999.000 999.000
x
GAD_T13 5.000 0.000 999.000 999.000
x
GAD_T14 5.000 0.000 999.000 999.000
x
GAD_T15 5.000 0.000 999.000 999.000
x
GAD_T16 5.000 0.000 999.000 999.000
x
GAD_T17 5.000 0.000 999.000 999.000
x
x
LIN2 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 1.000 0.000 999.000 999.000
x
GAD_T7 2.000 0.000 999.000 999.000
x
GAD_T8 3.000 0.000 999.000 999.000
x
GAD_T9 4.000 0.000 999.000 999.000
x
GAD_T10 6.000 0.000 999.000 999.000
x
GAD_T11 8.000 0.000 999.000 999.000
x
GAD_T12 8.000 0.000 999.000 999.000
x
GAD_T13 8.000 0.000 999.000 999.000
x
GAD_T14 8.000 0.000 999.000 999.000
x
GAD_T15 8.000 0.000 999.000 999.000
x
GAD_T16 8.000 0.000 999.000 999.000
x
GAD_T17 8.000 0.000 999.000 999.000
x
x
LIN3 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 2.000 0.000 999.000 999.000
x
GAD_T13 4.000 0.000 999.000 999.000
x
GAD_T14 6.000 0.000 999.000 999.000
x
GAD_T15 8.000 0.000 999.000 999.000
x
GAD_T16 8.000 0.000 999.000 999.000
x
GAD_T17 8.000 0.000 999.000 999.000
x
x
LIN4 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 2.000 0.000 999.000 999.000
x
GAD_T17 4.000 0.000 999.000 999.000
x
Piecewise with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[558:648]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
x
INT |
x
GAD_T0 0.959 0.006 170.501 0.000
x
GAD_T3 1.014 0.006 162.270 0.000
x
GAD_T4 1.025 0.006 166.222 0.000
x
GAD_T5 1.038 0.007 144.102 0.000
x
GAD_T6 1.042 0.007 144.677 0.000
x
GAD_T7 1.038 0.007 146.020 0.000
x
GAD_T8 1.035 0.007 145.972 0.000
x
GAD_T9 1.030 0.007 144.962 0.000
x
GAD_T10 1.022 0.007 142.013 0.000
x
GAD_T11 1.019 0.007 138.719 0.000
x
GAD_T12 1.021 0.007 140.402 0.000
x
GAD_T13 1.022 0.007 142.140 0.000
x
GAD_T14 1.020 0.007 141.068 0.000
x
GAD_T15 1.024 0.007 136.944 0.000
x
GAD_T16 1.021 0.008 135.887 0.000
x
GAD_T17 1.021 0.008 133.993 0.000
x
x
LIN1 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.291 0.009 33.947 0.000
x
GAD_T4 0.392 0.011 34.298 0.000
x
GAD_T5 0.496 0.015 33.523 0.000
x
GAD_T6 0.498 0.015 33.464 0.000
x
GAD_T7 0.496 0.015 33.569 0.000
x
GAD_T8 0.494 0.015 33.567 0.000
x
GAD_T9 0.492 0.015 33.587 0.000
x
GAD_T10 0.488 0.015 33.588 0.000
x
GAD_T11 0.487 0.015 33.562 0.000
x
GAD_T12 0.488 0.015 33.564 0.000
x
GAD_T13 0.488 0.015 33.598 0.000
x
GAD_T14 0.487 0.015 33.587 0.000
x
GAD_T15 0.489 0.015 33.533 0.000
x
GAD_T16 0.488 0.015 33.485 0.000
x
GAD_T17 0.488 0.015 33.461 0.000
x
x
LIN2 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.047 0.001 48.051 0.000
x
GAD_T7 0.093 0.002 48.252 0.000
x
GAD_T8 0.139 0.003 48.124 0.000
x
GAD_T9 0.185 0.004 48.126 0.000
x
GAD_T10 0.275 0.006 48.018 0.000
x
GAD_T11 0.365 0.008 48.202 0.000
x
GAD_T12 0.366 0.008 48.152 0.000
x
GAD_T13 0.366 0.008 48.142 0.000
x
GAD_T14 0.366 0.008 47.853 0.000
x
GAD_T15 0.367 0.008 47.581 0.000
x
GAD_T16 0.366 0.008 47.443 0.000
x
GAD_T17 0.366 0.008 47.412 0.000
x
x
LIN3 |
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.069 0.002 29.953 0.000
x
GAD_T13 0.137 0.005 29.977 0.000
x
GAD_T14 0.205 0.007 29.914 0.000
x
GAD_T15 0.275 0.009 29.822 0.000
x
GAD_T16 0.274 0.009 29.731 0.000
x
GAD_T17 0.274 0.009 29.945 0.000
x
x
LIN4 |
x
GAD_T0 999.000 999.000 999.000 999.000
x
GAD_T3 999.000 999.000 999.000 999.000
x
GAD_T4 999.000 999.000 999.000 999.000
x
GAD_T5 999.000 999.000 999.000 999.000
x
GAD_T6 999.000 999.000 999.000 999.000
x
GAD_T7 999.000 999.000 999.000 999.000
x
GAD_T8 999.000 999.000 999.000 999.000
x
GAD_T9 999.000 999.000 999.000 999.000
x
GAD_T10 999.000 999.000 999.000 999.000
x
GAD_T11 999.000 999.000 999.000 999.000
x
GAD_T12 999.000 999.000 999.000 999.000
x
GAD_T13 999.000 999.000 999.000 999.000
x
GAD_T14 999.000 999.000 999.000 999.000
x
GAD_T15 999.000 999.000 999.000 999.000
x
GAD_T16 999.000 999.000 999.000 999.000
x
GAD_T17 999.000 999.000 999.000 999.000
x
Intercepts

check intercept 0 for all time points

Linear

All is fine

anx.traj.all$gad_latentGrowthCurve_linear.out$output[335:352]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Linear with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[383:400]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Quadratic

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic.out$output[366:383]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Quadratic with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[410:427]  %>%
  str_split("/t") %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped")
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Piecewise

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise.out$output[458:475]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Piecewise with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[718:736]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
x
Intercepts
x
GAD_T0 0.000 0.000 999.000 999.000
x
GAD_T3 0.000 0.000 999.000 999.000
x
GAD_T4 0.000 0.000 999.000 999.000
x
GAD_T5 0.000 0.000 999.000 999.000
x
GAD_T6 0.000 0.000 999.000 999.000
x
GAD_T7 0.000 0.000 999.000 999.000
x
GAD_T8 0.000 0.000 999.000 999.000
x
GAD_T9 0.000 0.000 999.000 999.000
x
GAD_T10 0.000 0.000 999.000 999.000
x
GAD_T11 0.000 0.000 999.000 999.000
x
GAD_T12 0.000 0.000 999.000 999.000
x
GAD_T13 0.000 0.000 999.000 999.000
x
GAD_T14 0.000 0.000 999.000 999.000
x
GAD_T15 0.000 0.000 999.000 999.000
x
GAD_T16 0.000 0.000 999.000 999.000
x
GAD_T17 0.000 0.000 999.000 999.000
x
Correlations

Check that the model estimated correlations between all time points looks sensible.

Linear

All is fine

anx.traj.all$gad_latentGrowthCurve_linear.out$output[653:705]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
________ ________ ________ ________ ________
x
GAD_T0 1.000
x
GAD_T3 0.806 1.000
x
GAD_T4 0.810 0.860 1.000
x
GAD_T5 0.810 0.861 0.868 1.000
x
GAD_T6 0.807 0.860 0.867 0.869 1.000
x
GAD_T7 0.802 0.855 0.862 0.865 0.865
x
GAD_T8 0.795 0.849 0.857 0.860 0.861
x
GAD_T9 0.786 0.841 0.849 0.853 0.854
x
GAD_T10 0.772 0.829 0.838 0.842 0.844
x
GAD_T11 0.763 0.821 0.831 0.837 0.840
x
GAD_T12 0.755 0.816 0.826 0.833 0.837
x
GAD_T13 0.744 0.807 0.819 0.826 0.831
x
GAD_T14 0.730 0.794 0.807 0.815 0.821
x
GAD_T15 0.720 0.787 0.800 0.809 0.816
x
GAD_T16 0.706 0.774 0.788 0.798 0.806
x
GAD_T17 0.687 0.756 0.771 0.781 0.790
x
x
x
Model Estimated Correlations
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
________ ________ ________ ________ ________
x
GAD_T7 1.000
x
GAD_T8 0.858 1.000
x
GAD_T9 0.852 0.849 1.000
x
GAD_T10 0.843 0.841 0.837 1.000
x
GAD_T11 0.840 0.838 0.835 0.832 1.000
x
GAD_T12 0.837 0.837 0.835 0.833 0.837
x
GAD_T13 0.833 0.833 0.832 0.833 0.838
x
GAD_T14 0.823 0.825 0.824 0.827 0.834
x
GAD_T15 0.819 0.822 0.822 0.827 0.836
x
GAD_T16 0.810 0.813 0.815 0.821 0.832
x
GAD_T17 0.795 0.800 0.802 0.810 0.822
x
x
x
Model Estimated Correlations
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
________ ________ ________ ________ ________
x
GAD_T12 1.000
x
GAD_T13 0.845 1.000
x
GAD_T14 0.843 0.850 1.000
x
GAD_T15 0.847 0.855 0.858 1.000
x
GAD_T16 0.845 0.855 0.860 0.871 1.000
x
GAD_T17 0.837 0.849 0.855 0.868 0.875
x
x
x
Model Estimated Correlations
x
GAD_T17
x
________
x
GAD_T17 1.000
x
Linear with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[746:798]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
________ ________ ________ ________ ________
x
GAD_T0 1.000
x
GAD_T3 0.851 1.000
x
GAD_T4 0.799 0.881 1.000
x
GAD_T5 0.800 0.846 0.884 1.000
x
GAD_T6 0.799 0.846 0.857 0.887 1.000
x
GAD_T7 0.794 0.842 0.852 0.856 0.888
x
GAD_T8 0.789 0.837 0.848 0.852 0.854
x
GAD_T9 0.782 0.831 0.843 0.846 0.849
x
GAD_T10 0.769 0.820 0.832 0.836 0.840
x
GAD_T11 0.762 0.814 0.826 0.832 0.835
x
GAD_T12 0.756 0.810 0.823 0.828 0.833
x
GAD_T13 0.748 0.803 0.817 0.824 0.829
x
GAD_T14 0.736 0.793 0.807 0.814 0.820
x
GAD_T15 0.729 0.787 0.802 0.810 0.817
x
GAD_T16 0.718 0.778 0.794 0.802 0.810
x
GAD_T17 0.708 0.769 0.786 0.795 0.803
x
x
x
Model Estimated Correlations
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
________ ________ ________ ________ ________
x
GAD_T7 1.000
x
GAD_T8 0.894 1.000
x
GAD_T9 0.847 0.872 1.000
x
GAD_T10 0.838 0.836 0.865 1.000
x
GAD_T11 0.835 0.834 0.831 0.865 1.000
x
GAD_T12 0.833 0.833 0.831 0.829 0.865
x
GAD_T13 0.830 0.830 0.829 0.828 0.832
x
GAD_T14 0.822 0.823 0.823 0.823 0.828
x
GAD_T15 0.819 0.821 0.821 0.823 0.830
x
GAD_T16 0.813 0.815 0.817 0.820 0.828
x
GAD_T17 0.806 0.810 0.812 0.817 0.826
x
x
x
Model Estimated Correlations
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
________ ________ ________ ________ ________
x
GAD_T12 1.000
x
GAD_T13 0.871 1.000
x
GAD_T14 0.835 0.866 1.000
x
GAD_T15 0.838 0.845 0.872 1.000
x
GAD_T16 0.838 0.846 0.850 0.880 1.000
x
GAD_T17 0.838 0.847 0.852 0.862 0.887
x
x
x
Model Estimated Correlations
x
GAD_T17
x
________
x
GAD_T17 1.000
x
Quadratic

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic.out$output[709:760]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
________ ________ ________ ________ ________
x
GAD_T0 1.000
x
GAD_T3 0.828 1.000
x
GAD_T4 0.820 0.869 1.000
x
GAD_T5 0.809 0.865 0.868 1.000
x
GAD_T6 0.798 0.860 0.865 0.867 1.000
x
GAD_T7 0.785 0.852 0.859 0.862 0.864
x
GAD_T8 0.773 0.843 0.852 0.857 0.860
x
GAD_T9 0.759 0.833 0.843 0.849 0.854
x
GAD_T10 0.737 0.817 0.829 0.838 0.844
x
GAD_T11 0.723 0.807 0.821 0.831 0.839
x
GAD_T12 0.714 0.800 0.815 0.825 0.834
x
GAD_T13 0.708 0.794 0.809 0.820 0.829
x
GAD_T14 0.703 0.786 0.800 0.811 0.819
x
GAD_T15 0.708 0.787 0.800 0.809 0.817
x
GAD_T16 0.714 0.786 0.797 0.805 0.812
x
GAD_T17 0.719 0.781 0.790 0.795 0.800
x
x
x
Model Estimated Correlations
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
________ ________ ________ ________ ________
x
GAD_T7 1.000
x
GAD_T8 0.860 1.000
x
GAD_T9 0.855 0.854 1.000
x
GAD_T10 0.847 0.848 0.847 1.000
x
GAD_T11 0.843 0.846 0.845 0.846 1.000
x
GAD_T12 0.839 0.843 0.844 0.846 0.851
x
GAD_T13 0.835 0.839 0.840 0.843 0.849
x
GAD_T14 0.825 0.829 0.830 0.834 0.841
x
GAD_T15 0.822 0.826 0.827 0.831 0.839
x
GAD_T16 0.815 0.818 0.819 0.822 0.831
x
GAD_T17 0.801 0.803 0.802 0.805 0.814
x
x
x
Model Estimated Correlations
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
________ ________ ________ ________ ________
x
GAD_T12 1.000
x
GAD_T13 0.855 1.000
x
GAD_T14 0.848 0.853 1.000
x
GAD_T15 0.847 0.854 0.856 1.000
x
GAD_T16 0.841 0.850 0.856 0.869 1.000
x
GAD_T17 0.826 0.838 0.847 0.866 0.883
x
x
x
Model Estimated Correlations
x
GAD_T17
x
________
x
GAD_T17 1.000
Quadratic with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[851:798]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
x
x
GAD_T17 1.000
x
________
x
GAD_T17
x
Model Estimated Correlations
x
x
x
GAD_T17 0.833 0.843 0.849 0.862 0.886
x
GAD_T16 0.838 0.845 0.848 0.879 1.000
x
GAD_T15 0.840 0.846 0.872 1.000
x
GAD_T14 0.840 0.868 1.000
x
GAD_T13 0.873 1.000
x
GAD_T12 1.000
x
________ ________ ________ ________ ________
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
Model Estimated Correlations
x
x
x
GAD_T17 0.811 0.813 0.814 0.816 0.824
x
GAD_T16 0.815 0.818 0.820 0.822 0.829
x
GAD_T15 0.819 0.822 0.824 0.826 0.833
x
GAD_T14 0.821 0.825 0.826 0.828 0.834
x
GAD_T13 0.830 0.833 0.835 0.836 0.841
x
GAD_T12 0.834 0.836 0.838 0.838 0.868
x
GAD_T11 0.836 0.838 0.838 0.868 1.000
x
GAD_T10 0.840 0.841 0.866 1.000
x
GAD_T9 0.848 0.872 1.000
x
GAD_T8 0.894 1.000
x
GAD_T7 1.000
x
________ ________ ________ ________ ________
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
Model Estimated Correlations
x
x
x
GAD_T17 0.730 0.785 0.797 0.803 0.809
x
GAD_T16 0.724 0.784 0.798 0.805 0.812
x
GAD_T15 0.720 0.784 0.799 0.808 0.815
x
GAD_T14 0.719 0.785 0.801 0.809 0.817
x
GAD_T13 0.726 0.794 0.809 0.818 0.826
x
GAD_T12 0.731 0.799 0.814 0.823 0.830
x
GAD_T11 0.739 0.804 0.819 0.827 0.834
x
GAD_T10 0.750 0.812 0.826 0.833 0.838
x
GAD_T9 0.769 0.826 0.839 0.844 0.848
x
GAD_T8 0.779 0.834 0.845 0.849 0.852
x
GAD_T7 0.788 0.840 0.850 0.853 0.887
x
GAD_T6 0.798 0.846 0.855 0.887 1.000
x
GAD_T5 0.805 0.849 0.884 1.000
x
GAD_T4 0.812 0.884 1.000
x
GAD_T3 0.851 1.000
x
GAD_T0 1.000
x
________ ________ ________ ________ ________
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
Model Estimated Correlations
Piecewise

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise.out$output[854:906]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
________ ________ ________ ________ ________
x
GAD_T0 1.000
x
GAD_T3 0.851 1.000
x
GAD_T4 0.822 0.865 1.000
x
GAD_T5 0.788 0.858 0.875 1.000
x
GAD_T6 0.789 0.856 0.872 0.885 1.000
x
GAD_T7 0.784 0.849 0.864 0.875 0.876
x
GAD_T8 0.778 0.839 0.853 0.864 0.868
x
GAD_T9 0.769 0.828 0.840 0.850 0.856
x
GAD_T10 0.756 0.808 0.818 0.826 0.837
x
GAD_T11 0.744 0.789 0.798 0.803 0.820
x
GAD_T12 0.747 0.791 0.799 0.804 0.819
x
GAD_T13 0.748 0.791 0.798 0.803 0.816
x
GAD_T14 0.745 0.786 0.794 0.797 0.809
x
GAD_T15 0.747 0.787 0.794 0.797 0.807
x
GAD_T16 0.737 0.783 0.792 0.798 0.808
x
GAD_T17 0.730 0.784 0.795 0.803 0.812
x
x
x
Model Estimated Correlations
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
________ ________ ________ ________ ________
x
GAD_T7 1.000
x
GAD_T8 0.866 1.000
x
GAD_T9 0.857 0.856 1.000
x
GAD_T10 0.843 0.847 0.849 1.000
x
GAD_T11 0.831 0.840 0.847 0.864 1.000
x
GAD_T12 0.828 0.836 0.842 0.855 0.871
x
GAD_T13 0.824 0.831 0.834 0.845 0.858
x
GAD_T14 0.816 0.821 0.823 0.831 0.840
x
GAD_T15 0.812 0.816 0.817 0.822 0.828
x
GAD_T16 0.812 0.815 0.815 0.819 0.824
x
GAD_T17 0.816 0.818 0.818 0.820 0.824
x
x
x
Model Estimated Correlations
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
________ ________ ________ ________ ________
x
GAD_T12 1.000
x
GAD_T13 0.862 1.000
x
GAD_T14 0.852 0.862 1.000
x
GAD_T15 0.847 0.865 0.878 1.000
x
GAD_T16 0.839 0.852 0.861 0.875 1.000
x
GAD_T17 0.835 0.844 0.849 0.859 0.885
x
x
x
Model Estimated Correlations
x
GAD_T17
x
________
x
GAD_T17 1.000
x
Piecewise with pairwise correlations

All is fine

anx.traj.all$gad_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[948:1000]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
GAD_T0 GAD_T3 GAD_T4 GAD_T5 GAD_T6
x
________ ________ ________ ________ ________
x
GAD_T0 1.000
x
GAD_T3 0.853 1.000
x
GAD_T4 0.821 0.886 1.000
x
GAD_T5 0.791 0.851 0.884 1.000
x
GAD_T6 0.790 0.848 0.862 0.888 1.000
x
GAD_T7 0.784 0.839 0.852 0.867 0.890
x
GAD_T8 0.778 0.832 0.844 0.857 0.860
x
GAD_T9 0.771 0.822 0.833 0.846 0.851
x
GAD_T10 0.759 0.805 0.814 0.825 0.834
x
GAD_T11 0.750 0.791 0.800 0.809 0.822
x
GAD_T12 0.749 0.791 0.799 0.808 0.820
x
GAD_T13 0.748 0.789 0.797 0.806 0.817
x
GAD_T14 0.743 0.784 0.792 0.801 0.811
x
GAD_T15 0.744 0.784 0.792 0.801 0.810
x
GAD_T16 0.741 0.782 0.790 0.799 0.808
x
GAD_T17 0.741 0.782 0.790 0.799 0.808
x
x
x
Model Estimated Correlations
x
GAD_T7 GAD_T8 GAD_T9 GAD_T10 GAD_T11
x
________ ________ ________ ________ ________
x
GAD_T7 1.000
x
GAD_T8 0.895 1.000
x
GAD_T9 0.849 0.873 1.000
x
GAD_T10 0.837 0.840 0.867 1.000
x
GAD_T11 0.829 0.837 0.843 0.870 1.000
x
GAD_T12 0.826 0.833 0.838 0.849 0.872
x
GAD_T13 0.822 0.827 0.831 0.840 0.854
x
GAD_T14 0.815 0.819 0.822 0.829 0.840
x
GAD_T15 0.813 0.816 0.818 0.823 0.832
x
GAD_T16 0.810 0.814 0.816 0.821 0.830
x
GAD_T17 0.810 0.814 0.816 0.821 0.830
x
x
x
Model Estimated Correlations
x
GAD_T12 GAD_T13 GAD_T14 GAD_T15 GAD_T16
x
________ ________ ________ ________ ________
x
GAD_T12 1.000
x
GAD_T13 0.876 1.000
x
GAD_T14 0.845 0.870 1.000
x
GAD_T15 0.842 0.851 0.872 1.000
x
GAD_T16 0.839 0.848 0.853 0.880 1.000
x
GAD_T17 0.840 0.848 0.853 0.864 0.888
x
x
x
Model Estimated Correlations
x
GAD_T17
x
________
x
GAD_T17 1.000
x

Summary table of all fit indices

Sorted by BIC, as this is the most informative criteria (as per Muthens)

justSummaries <- do.call("rbind.fill",
  sapply(anx.traj.all ,"[", "summaries")) %>%
  select(c("Title", "Observations", "Parameters", "AIC", "BIC", "CFI", "TLI", "SRMR", "RMSEA_Estimate")) %>%
  arrange(BIC)

justSummaries %>%
  kbl() %>%
  kable_styling()
Title Observations Parameters AIC BIC CFI TLI SRMR RMSEA_Estimate
Anxiety symptoms in RAMP and COPING piecewise trajectory With pairwise correlations 41445 46 1658013 1658410 0.996 0.996 0.008 0.013
Anxiety symptoms in RAMP and COPING Quadratic Growth Curve With pairwise correlations 41445 40 1660647 1660992 0.989 0.988 0.013 0.021
Anxiety symptoms in RAMP and COPING piecewise trajectory No pairwise correlations 41445 36 1661334 1661645 0.988 0.987 0.009 0.022
Anxiety symptoms in RAMP and COPING Linear Growth Curve With pairwise correlations 41445 36 1661947 1662258 0.986 0.985 0.016 0.024
Anxiety symptoms in RAMP and COPING Quadratic Growth Curve No pairwise correlations 41445 25 1667841 1668056 0.971 0.972 0.018 0.032
Anxiety symptoms in RAMP and COPING Linear Growth Curve No pairwise correlations 41445 21 1671934 1672116 0.960 0.963 0.021 0.037

Plots

I show the plots for all runs. Output for all runs is available in the GMM folder on GitHub to review input and output data that generated these plots.

  1. Observed (dashed lines) and estimated (solid lines) means for best fit trajectory only
  2. Observed and estimated means: Showing model estimated means from linear, quadratic, and piecewise trajectories (solid lines) overlaid on the observed means from our sample (dashed line)
  3. Plot estimated mean trajectories for every model run (with and without pairwise correlations)
  4. plot estimated mean trajectories for the best of each pair of model (i.e. only including te version of the model where contiguous time point residuals were allowed to correlate as these were the best fit for the data)

Best model: Observed and estimated means

Showing model estimated means from piecewise trajectories with pairwise correlations between contiguous time points (solid lines) overlaid on the observed means from our sample (dashed line)

growth_curves_best <- ggplot() +
  geom_line(data = dat_anx_best,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_anx_best,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="GAD7 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(5,7), breaks=seq(5, 7, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
        hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_best

#### Observed and estimated means

Plot estimated means from model (solid lines) alongside the observed means (dashed lines) from the data.

Using the best models from each model type pairing (i.e. the version with pairwise correlations of residuals between contiguous time points)

growth_curves_run2c <- ggplot() +
  geom_line(data = dat_anx_run_2c,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_anx_run_2c,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="GAD7 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(5,7), breaks=seq(5, 7, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2c

All models

Plotting the estimated means for the trajectories with adjacent residuals correlated as these all had better fit than uncorrelated models

growth_curves_run2 <- ggplot() +
  geom_line(data = dat_anx_run_2,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_anx_run_2,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="GAD7 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(5,7), breaks=seq(5, 7, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2

Best model from each trajectory type

Only show the best of each pair of models (with or without pairwise residual correlations)

Linear: With correlations Quadratic: With correlations Piecewise: With correlations

growth_curves_run2b <- ggplot() +
  geom_line(data = dat_anx_run_2b,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_anx_run_2b,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette[c(4, 1:3)]) +
  labs(x = "Follow up time point", y ="GAD7 Score") +
  scale_y_continuous(expand = c(0,0), limits = c(5,7), breaks=seq(5, 7, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,15.5), breaks=seq(0, 15, by = 1),
                   labels = timepoint_list) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2b

MASQ: Current anhedonia

Measure has been reverse coded, such that higher scores indicate higher levels of negative affect, to correspond with the direction of the GAD-7 and PHQ 9

Will run these trajectories starting from follow up time 3 as this is the first point where we have both CPOING and RAMP data

Data summary

masq_check <-  readRDS("../../../data_clean/masq/masq.clean_merged_total_scores.rds")

# get a list of the total score columns
total_cols <- grep("total_Wave", names(masq_check))

#count how many columns we have
n_cols <- length(total_cols)

# create a list of how many NAs are missing across these 18 columns per row
list_n_missing <- apply(masq_check[total_cols],1,function(x) sum(is.na(x)))

# count how many people are missing data for all columns (NA = total_cols)
list_all_missing <-  sum(list_n_missing ==n_cols)

print(dim(masq_check)[1])

[1] 37151

print(list_all_missing)

[1] 1320

Note: this corresponds to the dataset with all time points, thus, different missing on all data pattern from MPlus run with time points 1,2 and baseline (have more missing all when we exclude the RAMP baseline!)

run all models

dont rerun models if there is already output for it (to save computational time), do show the output in the console

Note:

runModels("./MPlus_input_lcga/masq", 
          recursive = FALSE,
          showOutput=TRUE,
          replaceOutfile="never")

Examine model output

this reads in all output, including the gh5 plot files

anhed.traj.all <- readModels("./MPlus_input_lcga/masq", 
                           recursive=FALSE)

Check warnings and error messages

  • warnings
  • that none of the residual variances are negative and significant
  • loadings of indicators and intercept should all be 1, and estimates should relate to the time points you specified (e.g. lin 0, 1, 2; quad 0, 1, 4)
  • intercept 0 for all and correlations look sensible
warnings

at the moment this doesnt say which model the warning is from, so any warning requires checking to identify its source. Though order in list will give some indication

justWarnings <- do.call("paste",
  sapply(anhed.traj.all ,"[", "warnings"))

justWarnings

[1] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("All continuous latent variable covariances involving LIN1 have been fixed to 0", "because the variance of LIN1 is fixed at 0.") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”
[2] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("All continuous latent variable covariances involving LIN4 have been fixed to 0", "because the variance of LIN4 is fixed at 0.") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”
[3] “c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "3 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS") c("Data set contains cases with missing on all variables.", "These cases were not included in the analysis.", "Number of cases with missing on all variables: 4259", "1 WARNING(S) FOUND IN THE INPUT INSTRUCTIONS")”

Warnings are all about missing data (missing on all obs, this number lines up with our expectations from the dataset in the section above)

Otherwise, no warnings. Check one complete.

errors

Check any errors with running any of the models. Output here will not say which model it belongs to, so will need to manually examine if errors occur,

justErrors <- do.call("paste",
  sapply(anhed.traj.all ,"[", "errors"))

justErrors

character(0)

Issue 1: piecewise with correlations (resolved)

piecewise with correlations did not run due to issues with the first linear piece. Likely due to few pieces contributing to this section. Restrained variance to 0 for this piece and it ran successfully.

Check indicators of model success and stability

Tabs to check that:
1. Any residual variance is positive. Significant negative residual variance would indicate a model error. 2. The loadings of indicators and intercepts are 1 3. Estimates late correctly to specific time points (i.e. the relative time references for each time point make sense and are accurate). 4. The intercept is zero for all time points 5. Model estimated correlations between time points look sensible

Output from each relevant file will be printed in each tab for review without needing MPlus software. You may need to scroll across to see full output.

Residuals

check if any residual variances are negative and significant (would indicate model error) ###### Linear All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_linear.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Linear with pairwise correlations

All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_linear_withpairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic

All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_quadratic.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Quadratic with pairwise correlations

All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise

All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_piecewise.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Piecewise with pairwise correlations

All variances are positive

model <- anhed.traj.all$masq_latentGrowthCurve_piecewise_wPairwise_correlations.out$parameters$unstandardized
model[model$paramHeader == "Residual.Variances",]
Loadings & Estimates

Check loadings of indicators and intercepts are 1, and estimates relate to specified time points (e.g. lin 0, 1, 2; quad 0, 1, 4)

Note that time references are relative. For most models run here, a difference of 1 refers to a gap of 2 weeks. Thus a difference of 2 refers to a gap of 4 weeks. For Quadratic models, a difference of 0.5 indicates a gap of 2 weeks, and a difference of 1 indicates a gap of 4 weeks. 0 is always the start of a trajectory, before we expect any change to occur. E.g. baseline would be 0 in a linear model.

So linear trajectories (given we are not including follow up time points 1 and 2, which occurred during our 2 week assessment phase) should have a time point reference that looks something like: 0, 3, 4, 5, 6, 7, 8, 9 (two weekly assessment time period ends here, four weeekly assessment period begins), 11, 13, 15, 17, 19, 21, 23, 25

Linear

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear.out$output[280:314] %>%
  str_split("/t") %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped")
x
x
INT |
x
MASQ_T3 1.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 1.000 0.000 999.000 999.000
x
MASQ_T7 1.000 0.000 999.000 999.000
x
MASQ_T8 1.000 0.000 999.000 999.000
x
MASQ_T9 1.000 0.000 999.000 999.000
x
MASQ_T10 1.000 0.000 999.000 999.000
x
MASQ_T11 1.000 0.000 999.000 999.000
x
MASQ_T12 1.000 0.000 999.000 999.000
x
MASQ_T13 1.000 0.000 999.000 999.000
x
MASQ_T14 1.000 0.000 999.000 999.000
x
MASQ_T15 1.000 0.000 999.000 999.000
x
MASQ_T16 1.000 0.000 999.000 999.000
x
MASQ_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 2.000 0.000 999.000 999.000
x
MASQ_T6 3.000 0.000 999.000 999.000
x
MASQ_T7 4.000 0.000 999.000 999.000
x
MASQ_T8 5.000 0.000 999.000 999.000
x
MASQ_T9 6.000 0.000 999.000 999.000
x
MASQ_T10 8.000 0.000 999.000 999.000
x
MASQ_T11 10.000 0.000 999.000 999.000
x
MASQ_T12 12.000 0.000 999.000 999.000
x
MASQ_T13 14.000 0.000 999.000 999.000
x
MASQ_T14 16.000 0.000 999.000 999.000
x
MASQ_T15 18.000 0.000 999.000 999.000
x
MASQ_T16 20.000 0.000 999.000 999.000
x
MASQ_T17 22.000 0.000 999.000 999.000
x
Linear with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[284:317]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
MASQ_T3 1.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 1.000 0.000 999.000 999.000
x
MASQ_T7 1.000 0.000 999.000 999.000
x
MASQ_T8 1.000 0.000 999.000 999.000
x
MASQ_T9 1.000 0.000 999.000 999.000
x
MASQ_T10 1.000 0.000 999.000 999.000
x
MASQ_T11 1.000 0.000 999.000 999.000
x
MASQ_T12 1.000 0.000 999.000 999.000
x
MASQ_T13 1.000 0.000 999.000 999.000
x
MASQ_T14 1.000 0.000 999.000 999.000
x
MASQ_T15 1.000 0.000 999.000 999.000
x
MASQ_T16 1.000 0.000 999.000 999.000
x
MASQ_T17 1.000 0.000 999.000 999.000
x
x
SLOPE |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 2.000 0.000 999.000 999.000
x
MASQ_T6 3.000 0.000 999.000 999.000
x
MASQ_T7 4.000 0.000 999.000 999.000
x
MASQ_T8 5.000 0.000 999.000 999.000
x
MASQ_T9 6.000 0.000 999.000 999.000
x
MASQ_T10 8.000 0.000 999.000 999.000
x
MASQ_T11 10.000 0.000 999.000 999.000
x
MASQ_T12 12.000 0.000 999.000 999.000
x
MASQ_T13 14.000 0.000 999.000 999.000
x
MASQ_T14 16.000 0.000 999.000 999.000
x
MASQ_T15 18.000 0.000 999.000 999.000
x
MASQ_T16 20.000 0.000 999.000 999.000
x
MASQ_T17 22.000 0.000 999.000 999.000
x
Quadratic

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic.out$output[400:450]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
MASQ_T3 0.877 0.002 421.480 0.000
x
MASQ_T4 0.920 0.002 471.959 0.000
x
MASQ_T5 0.932 0.002 412.262 0.000
x
MASQ_T6 0.936 0.003 372.196 0.000
x
MASQ_T7 0.926 0.003 330.545 0.000
x
MASQ_T8 0.918 0.003 303.514 0.000
x
MASQ_T9 0.902 0.003 285.641 0.000
x
MASQ_T10 0.903 0.003 267.754 0.000
x
MASQ_T11 0.909 0.003 259.853 0.000
x
MASQ_T12 0.911 0.004 248.111 0.000
x
MASQ_T13 0.912 0.004 245.429 0.000
x
MASQ_T14 0.904 0.004 245.006 0.000
x
MASQ_T15 0.924 0.004 249.256 0.000
x
MASQ_T16 0.927 0.004 248.546 0.000
x
MASQ_T17 0.905 0.004 230.625 0.000
x
x
LIN |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.078 0.001 74.053 0.000
x
MASQ_T5 0.159 0.002 73.353 0.000
x
MASQ_T6 0.239 0.003 73.234 0.000
x
MASQ_T7 0.315 0.004 73.128 0.000
x
MASQ_T8 0.390 0.005 73.218 0.000
x
MASQ_T9 0.460 0.006 73.746 0.000
x
MASQ_T10 0.614 0.008 74.007 0.000
x
MASQ_T11 0.773 0.010 74.952 0.000
x
MASQ_T12 0.930 0.012 74.918 0.000
x
MASQ_T13 1.086 0.014 75.042 0.000
x
MASQ_T14 1.230 0.016 74.667 0.000
x
MASQ_T15 1.415 0.019 73.718 0.000
x
MASQ_T16 1.578 0.022 73.021 0.000
x
MASQ_T17 1.693 0.023 73.232 0.000
x
x
QUAD |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.003 0.000 60.792 0.000
x
MASQ_T5 0.012 0.000 60.512 0.000
x
MASQ_T6 0.028 0.000 60.470 0.000
x
MASQ_T7 0.049 0.001 60.498 0.000
x
MASQ_T8 0.076 0.001 60.645 0.000
x
MASQ_T9 0.107 0.002 61.018 0.000
x
MASQ_T10 0.191 0.003 61.076 0.000
x
MASQ_T11 0.300 0.005 61.569 0.000
x
MASQ_T12 0.433 0.007 61.429 0.000
x
MASQ_T13 0.590 0.010 61.342 0.000
x
MASQ_T14 0.764 0.013 60.947 0.000
x
MASQ_T15 0.988 0.016 60.371 0.000
x
MASQ_T16 1.225 0.020 60.148 0.000
x
MASQ_T17 1.446 0.024 61.288 0.000
x
Quadratic with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[287:337]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
MASQ_T3 1.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 1.000 0.000 999.000 999.000
x
MASQ_T7 1.000 0.000 999.000 999.000
x
MASQ_T8 1.000 0.000 999.000 999.000
x
MASQ_T9 1.000 0.000 999.000 999.000
x
MASQ_T10 1.000 0.000 999.000 999.000
x
MASQ_T11 1.000 0.000 999.000 999.000
x
MASQ_T12 1.000 0.000 999.000 999.000
x
MASQ_T13 1.000 0.000 999.000 999.000
x
MASQ_T14 1.000 0.000 999.000 999.000
x
MASQ_T15 1.000 0.000 999.000 999.000
x
MASQ_T16 1.000 0.000 999.000 999.000
x
MASQ_T17 1.000 0.000 999.000 999.000
x
x
LIN |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.500 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 1.500 0.000 999.000 999.000
x
MASQ_T7 2.000 0.000 999.000 999.000
x
MASQ_T8 2.500 0.000 999.000 999.000
x
MASQ_T9 3.000 0.000 999.000 999.000
x
MASQ_T10 4.000 0.000 999.000 999.000
x
MASQ_T11 5.000 0.000 999.000 999.000
x
MASQ_T12 6.000 0.000 999.000 999.000
x
MASQ_T13 7.000 0.000 999.000 999.000
x
MASQ_T14 8.000 0.000 999.000 999.000
x
MASQ_T15 9.000 0.000 999.000 999.000
x
MASQ_T16 10.000 0.000 999.000 999.000
x
MASQ_T17 11.000 0.000 999.000 999.000
x
x
QUAD |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.250 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 2.250 0.000 999.000 999.000
x
MASQ_T7 4.000 0.000 999.000 999.000
x
MASQ_T8 6.250 0.000 999.000 999.000
x
MASQ_T9 9.000 0.000 999.000 999.000
x
MASQ_T10 16.000 0.000 999.000 999.000
x
MASQ_T11 25.000 0.000 999.000 999.000
x
MASQ_T12 36.000 0.000 999.000 999.000
x
MASQ_T13 49.000 0.000 999.000 999.000
x
MASQ_T14 64.000 0.000 999.000 999.000
x
MASQ_T15 81.000 0.000 999.000 999.000
x
MASQ_T16 100.000 0.000 999.000 999.000
x
MASQ_T17 121.000 0.000 999.000 999.000
x
Piecewise

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise.out$output[490:574]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
MASQ_T3 0.926 0.003 292.034 0.000
x
MASQ_T4 0.927 0.003 283.770 0.000
x
MASQ_T5 0.908 0.004 205.043 0.000
x
MASQ_T6 0.921 0.004 207.125 0.000
x
MASQ_T7 0.915 0.004 207.138 0.000
x
MASQ_T8 0.910 0.004 203.775 0.000
x
MASQ_T9 0.898 0.004 201.805 0.000
x
MASQ_T10 0.903 0.005 198.854 0.000
x
MASQ_T11 0.907 0.005 192.387 0.000
x
MASQ_T12 0.914 0.005 194.835 0.000
x
MASQ_T13 0.922 0.005 195.738 0.000
x
MASQ_T14 0.926 0.005 191.488 0.000
x
MASQ_T15 0.937 0.005 186.895 0.000
x
MASQ_T16 0.923 0.005 189.735 0.000
x
MASQ_T17 0.901 0.005 180.688 0.000
x
x
LIN1 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.234 0.004 54.879 0.000
x
MASQ_T5 0.459 0.008 55.040 0.000
x
MASQ_T6 0.466 0.009 54.198 0.000
x
MASQ_T7 0.463 0.009 54.128 0.000
x
MASQ_T8 0.460 0.009 54.156 0.000
x
MASQ_T9 0.454 0.008 54.270 0.000
x
MASQ_T10 0.457 0.008 54.111 0.000
x
MASQ_T11 0.459 0.009 53.884 0.000
x
MASQ_T12 0.463 0.009 54.023 0.000
x
MASQ_T13 0.467 0.009 54.022 0.000
x
MASQ_T14 0.468 0.009 53.829 0.000
x
MASQ_T15 0.474 0.009 53.727 0.000
x
MASQ_T16 0.467 0.009 53.873 0.000
x
MASQ_T17 0.456 0.008 53.690 0.000
x
x
LIN2 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.062 0.001 73.839 0.000
x
MASQ_T7 0.124 0.002 73.319 0.000
x
MASQ_T8 0.185 0.003 73.007 0.000
x
MASQ_T9 0.244 0.003 73.451 0.000
x
MASQ_T10 0.367 0.005 73.441 0.000
x
MASQ_T11 0.492 0.007 75.295 0.000
x
MASQ_T12 0.496 0.007 74.554 0.000
x
MASQ_T13 0.500 0.007 73.642 0.000
x
MASQ_T14 0.502 0.007 73.277 0.000
x
MASQ_T15 0.508 0.007 72.749 0.000
x
MASQ_T16 0.500 0.007 73.350 0.000
x
MASQ_T17 0.489 0.007 72.705 0.000
x
x
LIN3 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.101 0.002 52.230 0.000
x
MASQ_T13 0.203 0.004 51.683 0.000
x
MASQ_T14 0.306 0.006 51.996 0.000
x
MASQ_T15 0.412 0.008 52.002 0.000
x
MASQ_T16 0.406 0.008 52.019 0.000
x
MASQ_T17 0.397 0.008 51.542 0.000
x
x
LIN4 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.158 0.007 23.445 0.000
x
MASQ_T17 0.308 0.013 23.280 0.000
x
Piecewise with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[340:424]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
INT |
x
MASQ_T3 1.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 1.000 0.000 999.000 999.000
x
MASQ_T6 1.000 0.000 999.000 999.000
x
MASQ_T7 1.000 0.000 999.000 999.000
x
MASQ_T8 1.000 0.000 999.000 999.000
x
MASQ_T9 1.000 0.000 999.000 999.000
x
MASQ_T10 1.000 0.000 999.000 999.000
x
MASQ_T11 1.000 0.000 999.000 999.000
x
MASQ_T12 1.000 0.000 999.000 999.000
x
MASQ_T13 1.000 0.000 999.000 999.000
x
MASQ_T14 1.000 0.000 999.000 999.000
x
MASQ_T15 1.000 0.000 999.000 999.000
x
MASQ_T16 1.000 0.000 999.000 999.000
x
MASQ_T17 1.000 0.000 999.000 999.000
x
x
LIN1 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 1.000 0.000 999.000 999.000
x
MASQ_T5 2.000 0.000 999.000 999.000
x
MASQ_T6 2.000 0.000 999.000 999.000
x
MASQ_T7 2.000 0.000 999.000 999.000
x
MASQ_T8 2.000 0.000 999.000 999.000
x
MASQ_T9 2.000 0.000 999.000 999.000
x
MASQ_T10 2.000 0.000 999.000 999.000
x
MASQ_T11 2.000 0.000 999.000 999.000
x
MASQ_T12 2.000 0.000 999.000 999.000
x
MASQ_T13 2.000 0.000 999.000 999.000
x
MASQ_T14 2.000 0.000 999.000 999.000
x
MASQ_T15 2.000 0.000 999.000 999.000
x
MASQ_T16 2.000 0.000 999.000 999.000
x
MASQ_T17 2.000 0.000 999.000 999.000
x
x
LIN2 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 1.000 0.000 999.000 999.000
x
MASQ_T7 2.000 0.000 999.000 999.000
x
MASQ_T8 3.000 0.000 999.000 999.000
x
MASQ_T9 4.000 0.000 999.000 999.000
x
MASQ_T10 6.000 0.000 999.000 999.000
x
MASQ_T11 8.000 0.000 999.000 999.000
x
MASQ_T12 8.000 0.000 999.000 999.000
x
MASQ_T13 8.000 0.000 999.000 999.000
x
MASQ_T14 8.000 0.000 999.000 999.000
x
MASQ_T15 8.000 0.000 999.000 999.000
x
MASQ_T16 8.000 0.000 999.000 999.000
x
MASQ_T17 8.000 0.000 999.000 999.000
x
x
LIN3 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 2.000 0.000 999.000 999.000
x
MASQ_T13 4.000 0.000 999.000 999.000
x
MASQ_T14 6.000 0.000 999.000 999.000
x
MASQ_T15 8.000 0.000 999.000 999.000
x
MASQ_T16 8.000 0.000 999.000 999.000
x
MASQ_T17 8.000 0.000 999.000 999.000
x
x
LIN4 |
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 2.000 0.000 999.000 999.000
x
MASQ_T17 4.000 0.000 999.000 999.000
x
Intercepts

check intercept 0 for all time points

Linear

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear.out$output[322:338]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Linear with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[367:383]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Quadratic

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic.out$output[463:479]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Quadratic with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[392:408]  %>%
  str_split("/t") %>%
  kbl() %>%
  kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Piecewise

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise.out$output[600:616]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Piecewise with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[694:710]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Intercepts
x
MASQ_T3 0.000 0.000 999.000 999.000
x
MASQ_T4 0.000 0.000 999.000 999.000
x
MASQ_T5 0.000 0.000 999.000 999.000
x
MASQ_T6 0.000 0.000 999.000 999.000
x
MASQ_T7 0.000 0.000 999.000 999.000
x
MASQ_T8 0.000 0.000 999.000 999.000
x
MASQ_T9 0.000 0.000 999.000 999.000
x
MASQ_T10 0.000 0.000 999.000 999.000
x
MASQ_T11 0.000 0.000 999.000 999.000
x
MASQ_T12 0.000 0.000 999.000 999.000
x
MASQ_T13 0.000 0.000 999.000 999.000
x
MASQ_T14 0.000 0.000 999.000 999.000
x
MASQ_T15 0.000 0.000 999.000 999.000
x
MASQ_T16 0.000 0.000 999.000 999.000
x
MASQ_T17 0.000 0.000 999.000 999.000
x
Correlations

Check that the model estimated correlations between all time points looks sensible.

Linear

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear.out$output[600:643]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.756 1.000
x
MASQ_T5 0.763 0.791 1.000
x
MASQ_T6 0.763 0.792 0.801 1.000
x
MASQ_T7 0.750 0.779 0.789 0.792 1.000
x
MASQ_T8 0.739 0.768 0.778 0.781 0.772
x
MASQ_T9 0.722 0.751 0.761 0.765 0.757
x
MASQ_T10 0.711 0.742 0.753 0.759 0.752
x
MASQ_T11 0.708 0.739 0.752 0.759 0.753
x
MASQ_T12 0.697 0.729 0.743 0.751 0.747
x
MASQ_T13 0.686 0.720 0.735 0.745 0.742
x
MASQ_T14 0.664 0.698 0.715 0.726 0.725
x
MASQ_T15 0.661 0.696 0.715 0.727 0.727
x
MASQ_T16 0.640 0.675 0.695 0.708 0.710
x
MASQ_T17 0.598 0.632 0.651 0.666 0.669
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.749 1.000
x
MASQ_T10 0.745 0.733 1.000
x
MASQ_T11 0.748 0.738 0.741 1.000
x
MASQ_T12 0.744 0.735 0.741 0.754 1.000
x
MASQ_T13 0.740 0.733 0.742 0.758 0.766
x
MASQ_T14 0.724 0.718 0.730 0.748 0.759
x
MASQ_T15 0.729 0.724 0.738 0.760 0.774
x
MASQ_T16 0.713 0.709 0.727 0.751 0.768
x
MASQ_T17 0.673 0.671 0.690 0.716 0.735
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.771 1.000
x
MASQ_T15 0.789 0.791 1.000
x
MASQ_T16 0.786 0.790 0.816 1.000
x
MASQ_T17 0.754 0.761 0.789 0.795 1.000
x
Linear with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_linear_withpairwiseCorrelations.out$output[687:730]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.815 1.000
x
MASQ_T5 0.740 0.817 1.000
x
MASQ_T6 0.744 0.768 0.823 1.000
x
MASQ_T7 0.733 0.758 0.768 0.822 1.000
x
MASQ_T8 0.724 0.750 0.761 0.767 0.826
x
MASQ_T9 0.711 0.736 0.748 0.754 0.746
x
MASQ_T10 0.703 0.730 0.742 0.749 0.742
x
MASQ_T11 0.702 0.729 0.743 0.751 0.745
x
MASQ_T12 0.693 0.721 0.736 0.745 0.740
x
MASQ_T13 0.687 0.716 0.731 0.742 0.739
x
MASQ_T14 0.666 0.695 0.711 0.723 0.721
x
MASQ_T15 0.668 0.698 0.716 0.728 0.727
x
MASQ_T16 0.654 0.685 0.703 0.717 0.716
x
MASQ_T17 0.622 0.652 0.670 0.685 0.686
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.782 1.000
x
MASQ_T10 0.738 0.770 1.000
x
MASQ_T11 0.743 0.734 0.785 1.000
x
MASQ_T12 0.739 0.731 0.736 0.786 1.000
x
MASQ_T13 0.738 0.732 0.739 0.753 0.796
x
MASQ_T14 0.721 0.716 0.725 0.741 0.749
x
MASQ_T15 0.729 0.725 0.736 0.755 0.765
x
MASQ_T16 0.719 0.717 0.730 0.751 0.763
x
MASQ_T17 0.689 0.688 0.703 0.725 0.739
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.787 1.000
x
MASQ_T15 0.779 0.814 1.000
x
MASQ_T16 0.779 0.777 0.824 1.000
x
MASQ_T17 0.756 0.757 0.783 0.808 1.000
x
Quadratic

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic.out$output[654:697]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.788 1.000
x
MASQ_T5 0.779 0.809 1.000
x
MASQ_T6 0.765 0.798 0.804 1.000
x
MASQ_T7 0.741 0.778 0.787 0.789 1.000
x
MASQ_T8 0.720 0.759 0.772 0.778 0.772
x
MASQ_T9 0.694 0.735 0.751 0.760 0.756
x
MASQ_T10 0.671 0.717 0.738 0.751 0.753
x
MASQ_T11 0.657 0.706 0.731 0.748 0.752
x
MASQ_T12 0.643 0.695 0.721 0.740 0.747
x
MASQ_T13 0.634 0.685 0.712 0.732 0.739
x
MASQ_T14 0.623 0.672 0.698 0.717 0.724
x
MASQ_T15 0.635 0.683 0.707 0.724 0.729
x
MASQ_T16 0.641 0.684 0.704 0.717 0.720
x
MASQ_T17 0.634 0.670 0.684 0.691 0.689
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.754 1.000
x
MASQ_T10 0.754 0.748 1.000
x
MASQ_T11 0.757 0.753 0.768 1.000
x
MASQ_T12 0.754 0.752 0.770 0.787 1.000
x
MASQ_T13 0.747 0.746 0.766 0.785 0.795
x
MASQ_T14 0.731 0.730 0.750 0.770 0.782
x
MASQ_T15 0.735 0.733 0.752 0.773 0.786
x
MASQ_T16 0.723 0.719 0.736 0.756 0.770
x
MASQ_T17 0.689 0.682 0.695 0.712 0.727
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.787 1.000
x
MASQ_T15 0.795 0.792 1.000
x
MASQ_T16 0.782 0.784 0.809 1.000
x
MASQ_T17 0.742 0.750 0.783 0.803 1.000
x
Quadratic with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_quadratic_withPairwiseCorrelations.out$output[736:779]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.815 1.000
x
MASQ_T5 0.761 0.820 1.000
x
MASQ_T6 0.752 0.777 0.825 1.000
x
MASQ_T7 0.731 0.759 0.768 0.821 1.000
x
MASQ_T8 0.715 0.745 0.757 0.763 0.827
x
MASQ_T9 0.694 0.726 0.740 0.748 0.743
x
MASQ_T10 0.677 0.712 0.731 0.743 0.741
x
MASQ_T11 0.668 0.706 0.728 0.743 0.744
x
MASQ_T12 0.658 0.698 0.722 0.738 0.741
x
MASQ_T13 0.650 0.691 0.715 0.732 0.736
x
MASQ_T14 0.636 0.675 0.698 0.715 0.719
x
MASQ_T15 0.645 0.683 0.705 0.720 0.723
x
MASQ_T16 0.650 0.685 0.704 0.717 0.718
x
MASQ_T17 0.647 0.677 0.692 0.701 0.699
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.783 1.000
x
MASQ_T10 0.742 0.776 1.000
x
MASQ_T11 0.748 0.744 0.792 1.000
x
MASQ_T12 0.747 0.745 0.761 0.795 1.000
x
MASQ_T13 0.742 0.741 0.758 0.778 0.806
x
MASQ_T14 0.725 0.724 0.741 0.761 0.773
x
MASQ_T15 0.728 0.727 0.744 0.765 0.778
x
MASQ_T16 0.721 0.719 0.735 0.755 0.769
x
MASQ_T17 0.700 0.696 0.708 0.727 0.742
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.793 1.000
x
MASQ_T15 0.786 0.819 1.000
x
MASQ_T16 0.780 0.777 0.823 1.000
x
MASQ_T17 0.755 0.757 0.782 0.802 1.000
x
Piecewise

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise.out$output[793:836]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.807 1.000
x
MASQ_T5 0.739 0.798 1.000
x
MASQ_T6 0.738 0.795 0.833 1.000
x
MASQ_T7 0.722 0.776 0.812 0.815 1.000
x
MASQ_T8 0.707 0.758 0.791 0.798 0.788
x
MASQ_T9 0.686 0.734 0.765 0.775 0.770
x
MASQ_T10 0.666 0.710 0.737 0.754 0.757
x
MASQ_T11 0.647 0.686 0.709 0.734 0.744
x
MASQ_T12 0.649 0.685 0.706 0.728 0.736
x
MASQ_T13 0.653 0.686 0.703 0.723 0.730
x
MASQ_T14 0.653 0.683 0.697 0.715 0.719
x
MASQ_T15 0.658 0.684 0.695 0.712 0.714
x
MASQ_T16 0.655 0.686 0.701 0.717 0.719
x
MASQ_T17 0.646 0.681 0.700 0.716 0.717
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.765 1.000
x
MASQ_T10 0.759 0.756 1.000
x
MASQ_T11 0.754 0.758 0.790 1.000
x
MASQ_T12 0.745 0.747 0.776 0.805 1.000
x
MASQ_T13 0.736 0.737 0.761 0.786 0.787
x
MASQ_T14 0.724 0.723 0.743 0.764 0.775
x
MASQ_T15 0.717 0.714 0.730 0.747 0.768
x
MASQ_T16 0.721 0.718 0.733 0.749 0.765
x
MASQ_T17 0.719 0.715 0.730 0.744 0.755
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.787 1.000
x
MASQ_T15 0.791 0.810 1.000
x
MASQ_T16 0.781 0.795 0.814 1.000
x
MASQ_T17 0.766 0.773 0.786 0.815 1.000
x
Piecewise with pairwise correlations

All is fine

anhed.traj.all$masq_latentGrowthCurve_piecewise_wPairwise_correlations.out$output[887:930]  %>%   str_split("/t") %>%   kbl() %>%   kable_styling(bootstrap_options = "striped")
x
Model Estimated Correlations
x
MASQ_T3 MASQ_T4 MASQ_T5 MASQ_T6 MASQ_T7
x
________ ________ ________ ________ ________
x
MASQ_T3 1.000
x
MASQ_T4 0.819 1.000
x
MASQ_T5 0.761 0.822 1.000
x
MASQ_T6 0.756 0.785 0.827 1.000
x
MASQ_T7 0.737 0.765 0.780 0.825 1.000
x
MASQ_T8 0.723 0.750 0.765 0.769 0.828
x
MASQ_T9 0.705 0.731 0.746 0.753 0.747
x
MASQ_T10 0.686 0.712 0.727 0.740 0.740
x
MASQ_T11 0.673 0.698 0.712 0.732 0.738
x
MASQ_T12 0.670 0.695 0.709 0.727 0.732
x
MASQ_T13 0.667 0.692 0.706 0.722 0.725
x
MASQ_T14 0.663 0.688 0.702 0.717 0.718
x
MASQ_T15 0.665 0.690 0.703 0.716 0.715
x
MASQ_T16 0.660 0.685 0.698 0.711 0.710
x
MASQ_T17 0.648 0.672 0.686 0.698 0.697
x
x
x
Model Estimated Correlations
x
MASQ_T8 MASQ_T9 MASQ_T10 MASQ_T11 MASQ_T12
x
________ ________ ________ ________ ________
x
MASQ_T8 1.000
x
MASQ_T9 0.785 1.000
x
MASQ_T10 0.744 0.777 1.000
x
MASQ_T11 0.749 0.755 0.794 1.000
x
MASQ_T12 0.741 0.745 0.772 0.801 1.000
x
MASQ_T13 0.732 0.735 0.758 0.787 0.803
x
MASQ_T14 0.723 0.724 0.744 0.769 0.774
x
MASQ_T15 0.719 0.718 0.735 0.757 0.769
x
MASQ_T16 0.714 0.713 0.730 0.751 0.763
x
MASQ_T17 0.701 0.700 0.716 0.737 0.750
x
x
x
Model Estimated Correlations
x
MASQ_T13 MASQ_T14 MASQ_T15 MASQ_T16 MASQ_T17
x
________ ________ ________ ________ ________
x
MASQ_T13 1.000
x
MASQ_T14 0.795 1.000
x
MASQ_T15 0.781 0.805 1.000
x
MASQ_T16 0.776 0.788 0.819 1.000
x
MASQ_T17 0.762 0.774 0.791 0.812 1.000
x

Summary table of all fit indices

Sorted by BIC, as this is the most informative criteria (as per Muthens)

justSummaries <- do.call("rbind.fill",
  sapply(anhed.traj.all ,"[", "summaries")) %>%
  select(c("Title", "Observations", "Parameters", "AIC", "BIC", "CFI", "TLI", "SRMR", "RMSEA_Estimate")) %>%
  arrange(BIC)

justSummaries %>%
  kbl() %>%
  kable_styling()
Title Observations Parameters AIC BIC CFI TLI SRMR RMSEA_Estimate
Anhedonia symptoms in RAMP and COPING piecewise trajectory With pairwise correlations 32892 40 1795036 1795372 0.984 0.982 0.032 0.032
Anhedonia symptoms in RAMP and COPING piecewise trajectory No pairwise correlations 32892 35 1796887 1797181 0.978 0.977 0.026 0.037
Anhedonia symptoms in RAMP and COPING Quadratic Growth Curve With pairwise correlations 32892 38 1797427 1797746 0.975 0.973 0.042 0.040
Anhedonia symptoms in RAMP and COPING Linear Growth Curve With pairwise correlations 32892 34 1799404 1799690 0.968 0.967 0.043 0.044
Anhedonia symptoms in RAMP and COPING Quadratic Growth Curve No pairwise correlations 32892 24 1802466 1802668 0.958 0.961 0.044 0.048
Anhedonia symptoms in RAMP and COPING Linear Growth Curve No pairwise correlations 32892 20 1806998 1807166 0.943 0.948 0.046 0.056

Plots

I show the plots for all runs. Output for all runs is available in the GMM folder on GitHub to review input and output data that generated these plots.

  1. Observed (dashed lines) and estimated (solid lines) means for best fit trajectory only
  2. Observed and estimated means: Showing model estimated means from linear, quadratic, and piecewise trajectories (solid lines) overlaid on the observed means from our sample (dashed line)
  3. Plot estimated mean trajectories for every model run (with and without pairwise correlations)
  4. plot estimated mean trajectories for the best of each pair of model (i.e. only including te version of the model where contiguous time point residuals were allowed to correlate as these were the best fit for the data)

Best model: Observed and estimated means

Showing model estimated means from piecewise trajectories with pairwise correlations between contiguous time points (solid lines) overlaid on the observed means from our sample (dashed line)

growth_curves_best <- ggplot() +
  geom_line(data = dat_anhed_best,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_anhed_best,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="masq (reverse) Score") +
  scale_y_continuous(expand = c(0,0), limits = c(25,29), breaks=seq(25, 29, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,14.5), breaks=seq(0, 14, by = 1),
                   labels = timepoint_list_anh) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
        hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_best

#### Observed and estimated means

Plot estimated means from model (solid lines) alongside the observed means (dashed lines) from the data.

Using the best models from each model type pairing (i.e. the version with pairwise correlations of residuals between contiguous time points)

growth_curves_run2c <- ggplot() +
  geom_line(data = dat_anhed_run_2c,
        aes(x = timepoint, y = score, colour = Model,linetype=Type)) +
  geom_point(data = dat_anhed_run_2c,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="masq (reverse) Score") +
  scale_y_continuous(expand = c(0,0), limits = c(25,29), breaks=seq(25, 29, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,14.5), breaks=seq(0, 14, by = 1),
                   labels = timepoint_list_anh) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2c

All models

Plotting the estimated means for the trajectories with adjacent residuals correlated as these all had better fit than uncorrelated models

growth_curves_run2 <- ggplot() +
  geom_line(data = dat_anhed_run_2,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_anhed_run_2,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette) +
  labs(x = "Follow up time point", y ="masq (reverse) Score") +
  scale_y_continuous(expand = c(0,0), limits = c(25,29), breaks=seq(25, 29, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,14.5), breaks=seq(0, 14, by = 1),
                   labels = timepoint_list_anh) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2

Best model from each trajectory type

Only show the best of each pair of models (with or without pairwise residual correlations)

Linear: With correlations Quadratic: With correlations Piecewise: With correlations

growth_curves_run2b <- ggplot() +
  geom_line(data = dat_anhed_run_2b,
        aes(x = timepoint, y = score, colour = Model), size = 1) +
  geom_point(data = dat_anhed_run_2b,
        aes(x = timepoint, y = score, colour = Model, shape=Model), show.legend = F) +
  scale_color_manual(values = pres.palette[c(4, 1:3)]) +
  labs(x = "Follow up time point", y ="masq (reverse) Score") +
  scale_y_continuous(expand = c(0,0), limits = c(25,29), breaks=seq(25, 29, 1)) + 
  scale_x_continuous(expand = c(0,0), limits = c(-0.5,14.5), breaks=seq(0, 14, by = 1),
                   labels = timepoint_list_anh) +
  theme(panel.grid.major.y = element_line(size = 0.5,
                                        linetype = 'dashed',
                                        colour = "gray"),
        axis.text = element_text(colour="black", size = 14),
        axis.title = element_text(colour="black", size = 16),
        axis.text.x = element_text(angle = 90,
                                   hjust=1),
        legend.key = element_blank(),
        legend.text = element_text(colour = "black", size = 11),
        panel.background = element_blank()) 

growth_curves_run2b